Make the check slightly less convoluted
This commit is contained in:
parent
42b310e337
commit
5f6aaa4573
|
@ -1563,10 +1563,9 @@ bool CheckUninitVar::checkIfForWhileHead(const Token *startparentheses, const Va
|
|||
}
|
||||
|
||||
if (isVariableUsage(tok, var.isPointer(), alloc)) {
|
||||
if (!suppressErrors)
|
||||
uninitvarError(tok, tok->str());
|
||||
else
|
||||
if (suppressErrors)
|
||||
continue;
|
||||
uninitvarError(tok, tok->str());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue