From 5f6aaa4573a6d328b5dd4a18c1a4a8a0e35fa819 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Fri, 20 Mar 2015 11:03:11 +0300 Subject: [PATCH] Make the check slightly less convoluted --- lib/checkuninitvar.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/checkuninitvar.cpp b/lib/checkuninitvar.cpp index a19d64273..14e87f5ff 100644 --- a/lib/checkuninitvar.cpp +++ b/lib/checkuninitvar.cpp @@ -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; }