From 3c207da9105652c1593f7812da093c55cf43dd39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 18 Nov 2020 15:43:09 +0100 Subject: [PATCH] Code cleanup. Fix gcc warning. --- lib/reverseanalyzer.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/reverseanalyzer.cpp b/lib/reverseanalyzer.cpp index 314490ef8..f698dacee 100644 --- a/lib/reverseanalyzer.cpp +++ b/lib/reverseanalyzer.cpp @@ -188,11 +188,9 @@ struct ReverseTraversal { break; valueFlowGenericForward(condTok, analyzer, settings); } - Token* thenEnd = nullptr; - Token* elseEnd = nullptr; + Token* thenEnd; const bool hasElse = Token::simpleMatch(tok->link()->tokAt(-2), "} else {"); if (hasElse) { - elseEnd = tok; thenEnd = tok->link()->tokAt(-2); } else { thenEnd = tok;