Fixed some compiler warning about signed/unsigned conversions.
This commit is contained in:
parent
3e65cb446e
commit
a52401cf1b
|
@ -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<unsigned int>(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() &&
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue