diff --git a/lib/checkio.cpp b/lib/checkio.cpp index 91a33e783..78f6ff445 100644 --- a/lib/checkio.cpp +++ b/lib/checkio.cpp @@ -529,7 +529,7 @@ void CheckIO::checkWrongPrintfScanfArguments() if (formatStringArgNo >= 0) { // formatstring found in library. Find format string and first argument belonging to format string. - if (!findFormat(formatStringArgNo, tok->tokAt(2), &formatStringTok, &argListTok)) + if (!findFormat(static_cast(formatStringArgNo), tok->tokAt(2), &formatStringTok, &argListTok)) continue; } else if (windows && Token::Match(tok, "Format|AppendFormat (") && Token::Match(tok->tokAt(-2), "%var% .") && tok->tokAt(-2)->variable() && diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index c11bce872..85582816d 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -3564,7 +3564,7 @@ bool Tokenizer::simplifyTokenList2() for (Token *tok = list.front(); tok; tok = tok->next()) { if (Token::Match(tok, "const static| %type% %var% = %num% ;") || Token::Match(tok, "const static| %type% %var% ( %num% ) ;")) { - unsigned int offset = 0; + int offset = 0; if (tok->strAt(1) == "static") offset = 1; const unsigned int varId(tok->tokAt(2 + offset)->varId());