Change argument to Tempvar constructor to size_t, avoids conversion warning in template construction

This commit is contained in:
Tim Wojtulewicz 2023-02-17 16:35:27 -07:00 committed by Tim Wojtulewicz
parent 6398329cd5
commit 718cced7cd
2 changed files with 3 additions and 3 deletions

View file

@ -7,10 +7,10 @@
namespace zeek::detail
{
TempVar::TempVar(int num, const TypePtr& t, ExprPtr _rhs) : type(t)
TempVar::TempVar(size_t num, const TypePtr& t, ExprPtr _rhs) : type(t)
{
char buf[8192];
snprintf(buf, sizeof buf, "#%d", num);
snprintf(buf, sizeof buf, "#%zu", num);
name = buf;
rhs = std::move(_rhs);
}