From a52401cf1bf0f2edf7d3264a3bf8daf11fa22094 Mon Sep 17 00:00:00 2001 From: PKEuS Date: Tue, 2 Sep 2014 11:44:51 +0200 Subject: [PATCH] Fixed some compiler warning about signed/unsigned conversions. --- lib/checkio.cpp | 2 +- lib/tokenize.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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());