From c67e618627f489873bce5b3d8d6bf18a8067f2c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 14 May 2021 23:05:27 +0200 Subject: [PATCH] self check; Fix shadow variable --- lib/checkuninitvar.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/checkuninitvar.cpp b/lib/checkuninitvar.cpp index f61039ce9..e2cdf8abf 100644 --- a/lib/checkuninitvar.cpp +++ b/lib/checkuninitvar.cpp @@ -842,9 +842,9 @@ const Token* CheckUninitVar::checkLoopBodyRecursive(const Token *start, const Va if (!Token::simpleMatch(top->previous(), "for (") || !Token::simpleMatch(top->link(), ") {")) continue; const Token *bodyStart = top->link()->next(); - const Token *errorToken = checkLoopBodyRecursive(bodyStart, var, alloc, membervar, bailout); - if (errorToken) - return errorToken; + const Token *errorToken1 = checkLoopBodyRecursive(bodyStart, var, alloc, membervar, bailout); + if (errorToken1) + return errorToken1; if (bailout) return nullptr; }