Proper if-else-if chain for mutually exclusive conditions
This commit is contained in:
parent
d8d18ac6dd
commit
89ec9058a8
|
@ -1302,7 +1302,7 @@ bool CheckUninitVar::checkScopeForVariable(const Token *tok, const Variable& var
|
|||
for (const Token *tok2 = tok; tok2 && tok2 != tok->link(); tok2 = tok2->next()) {
|
||||
if (Token::Match(tok2, "[;{}.] %name% = - %name% ;"))
|
||||
varValueIf[tok2->next()->varId()] = NOT_ZERO;
|
||||
if (Token::Match(tok2, "[;{}.] %name% = %num% ;"))
|
||||
else if (Token::Match(tok2, "[;{}.] %name% = %num% ;"))
|
||||
varValueIf[tok2->next()->varId()] = (int)MathLib::toLongNumber(tok2->strAt(3));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue