Skip to content

Commit 28d2bdc

Browse files
Update checkuninitvar.cpp
1 parent e43606c commit 28d2bdc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/checkuninitvar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ bool CheckUninitVar::checkIfForWhileHead(const Token *startparentheses, const Va
906906
continue;
907907
uninitvarError(errorToken, errorToken->expressionString(), alloc);
908908
}
909-
return true;
909+
return !Token::Match(tok->astParent(), "!|%comp%");
910910
}
911911
// skip sizeof / offsetof
912912
if (isUnevaluated(tok))

0 commit comments

Comments
 (0)