Fixed internal warning

This commit is contained in:
PKEuS 2015-11-06 22:21:39 +01:00
parent b20a7e3192
commit 0ac89c8af2
2 changed files with 2 additions and 2 deletions

View File

@ -189,7 +189,7 @@ void CheckSizeof::checkSizeofForPointerSize()
// This is to allow generic operations with sizeof
for (; tokSize && tokSize->str() != ")" && tokSize->str() != "," && tokSize->str() != "sizeof"; tokSize = tokSize->next()) {}
if (Token::Match(tokSize, "sizeof ( &"))
if (Token::simpleMatch(tokSize, "sizeof ( &"))
tokSize = tokSize->tokAt(3);
else if (Token::Match(tokSize, "sizeof (|&"))
tokSize = tokSize->tokAt(2);

View File

@ -2584,7 +2584,7 @@ void Tokenizer::setVarIdClassDeclaration(Token * const startToken,
const Token *initListArgLastToken = nullptr;
for (Token *tok = startToken->next(); tok != endToken; tok = tok->next()) {
if (!tok)
syntaxError(nullptr); // #7089 invalid code
syntaxError(nullptr); // #7089 invalid code
if (initList) {
if (tok == initListArgLastToken)
initListArgLastToken = nullptr;