Fixed internal warning
This commit is contained in:
parent
b20a7e3192
commit
0ac89c8af2
|
@ -189,7 +189,7 @@ void CheckSizeof::checkSizeofForPointerSize()
|
||||||
// This is to allow generic operations with sizeof
|
// This is to allow generic operations with sizeof
|
||||||
for (; tokSize && tokSize->str() != ")" && tokSize->str() != "," && tokSize->str() != "sizeof"; tokSize = tokSize->next()) {}
|
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);
|
tokSize = tokSize->tokAt(3);
|
||||||
else if (Token::Match(tokSize, "sizeof (|&"))
|
else if (Token::Match(tokSize, "sizeof (|&"))
|
||||||
tokSize = tokSize->tokAt(2);
|
tokSize = tokSize->tokAt(2);
|
||||||
|
|
|
@ -2584,7 +2584,7 @@ void Tokenizer::setVarIdClassDeclaration(Token * const startToken,
|
||||||
const Token *initListArgLastToken = nullptr;
|
const Token *initListArgLastToken = nullptr;
|
||||||
for (Token *tok = startToken->next(); tok != endToken; tok = tok->next()) {
|
for (Token *tok = startToken->next(); tok != endToken; tok = tok->next()) {
|
||||||
if (!tok)
|
if (!tok)
|
||||||
syntaxError(nullptr); // #7089 invalid code
|
syntaxError(nullptr); // #7089 invalid code
|
||||||
if (initList) {
|
if (initList) {
|
||||||
if (tok == initListArgLastToken)
|
if (tok == initListArgLastToken)
|
||||||
initListArgLastToken = nullptr;
|
initListArgLastToken = nullptr;
|
||||||
|
|
Loading…
Reference in New Issue