Fixed gcc compiler warnings

This commit is contained in:
Daniel Marjamäki 2011-12-03 09:57:56 +01:00
parent fb3115a199
commit 69d3d4a17d
1 changed files with 2 additions and 2 deletions

View File

@ -2170,14 +2170,14 @@ void CheckOther::checkIncorrectStringCompare()
if (Token::Match(tok, ". substr ( %any% , %num% ) ==|!= %str%")) {
MathLib::bigint clen = MathLib::toLongNumber(tok->strAt(5));
std::size_t slen = Token::getStrLength(tok->tokAt(8));
if (clen != slen) {
if (clen != (int)slen) {
incorrectStringCompareError(tok->next(), "substr", tok->strAt(8), tok->strAt(5));
}
}
if (Token::Match(tok, "%str% ==|!= %var% . substr ( %any% , %num% )")) {
MathLib::bigint clen = MathLib::toLongNumber(tok->strAt(8));
std::size_t slen = Token::getStrLength(tok);
if (clen != slen) {
if (clen != (int)slen) {
incorrectStringCompareError(tok->next(), "substr", tok->str(), tok->strAt(8));
}
}