diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp index 25be24834..bc90bcd71 100644 --- a/lib/checkbufferoverrun.cpp +++ b/lib/checkbufferoverrun.cpp @@ -714,7 +714,10 @@ void CheckBufferOverrun::checkScope(const Token *tok, const std::vector 0) { - ArrayInfo arrayInfo(0U, varnames, total_size / size, size); + ArrayInfo arrayInfo(0U, + varnames, + (unsigned int)(total_size / size), + (unsigned int)size); if (Token::Match(tok, ("%var% ( " + varnames + " ,").c_str())) checkFunctionCall(*tok, 1, arrayInfo); if (Token::Match(tok, ("%var% ( %var% , " + varnames + " ,").c_str()))