Bug hunting: Do not warn about 'Division by zero' when variable is uninitialized
This commit is contained in:
parent
5d67fd0e56
commit
daea5e2d6c
|
@ -1975,6 +1975,8 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
|
|||
return;
|
||||
if (tok->hasKnownIntValue() && tok->getKnownIntValue() != 0)
|
||||
return;
|
||||
if (value.isUninit())
|
||||
return;
|
||||
float f = getKnownFloatValue(tok, 0.0f);
|
||||
if (f > 0.0f || f < 0.0f)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue