Fixed Cppcheck warning about possible null pointer dereference
This commit is contained in:
parent
5a9328f26a
commit
0dd008e068
|
@ -2638,7 +2638,7 @@ void CheckOther::checkVarFuncNullUB()
|
||||||
if (f && f->argCount() <= argnr) {
|
if (f && f->argCount() <= argnr) {
|
||||||
const Token *tok2 = f->argDef;
|
const Token *tok2 = f->argDef;
|
||||||
tok2 = tok2 ? tok2->link() : nullptr; // goto ')'
|
tok2 = tok2 ? tok2->link() : nullptr; // goto ')'
|
||||||
if (Token::simpleMatch(tok2->tokAt(-3), ". . ."))
|
if (tok2 && Token::simpleMatch(tok2->tokAt(-3), ". . ."))
|
||||||
varFuncNullUBError(tok);
|
varFuncNullUBError(tok);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue