From 1a8c410c06edc92fea1a91fdcf7e5ee1ed85cc85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 31 Dec 2010 14:18:24 +0100 Subject: [PATCH] gcc: fixed compiler warning (suggest parantheses around assignment) --- lib/checknullpointer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checknullpointer.cpp b/lib/checknullpointer.cpp index da4d644b5..7e9932978 100644 --- a/lib/checknullpointer.cpp +++ b/lib/checknullpointer.cpp @@ -171,7 +171,7 @@ void CheckNullPointer::nullPointerAfterLoop() const Token *tok2 = tok->tokAt(4)->link(); // Check if the variable is dereferenced after the while loop - while (tok2 = tok2 ? tok2->next() : 0) + while (0 != (tok2 = tok2 ? tok2->next() : 0)) { // Don't check into inner scopes or outer scopes. Stop checking if "break" is found if (tok2->str() == "{" || tok2->str() == "}" || tok2->str() == "break")