Make the check slightly less convoluted

This commit is contained in:
Dmitry-Me 2015-03-20 11:03:11 +03:00
parent 42b310e337
commit 5f6aaa4573
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}