From 4a8a5d44608aa2d5008c103aee5a2522e93d1535 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Tue, 15 Dec 2015 11:34:04 +0300 Subject: [PATCH] Fix C4706 assignment within conditional --- lib/tokenlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index 3ca0df1f9..dc9b6c99f 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -1073,7 +1073,7 @@ void TokenList::validateAst() // check for endless recursion const Token* parent=tok; - while ((parent = parent->astParent())) { + while ((parent = parent->astParent()) != nullptr) { if (parent==tok) throw InternalError(tok, "AST broken: endless recursion from '" + tok->str() + "'", InternalError::SYNTAX); }