Fixed self-check warning, shadow variable

This commit is contained in:
Daniel Marjamäki 2021-05-17 11:35:04 +02:00
parent b115e4a932
commit c78a1dbbaf
1 changed files with 2 additions and 2 deletions

View File

@ -920,8 +920,8 @@ const Token* CheckUninitVar::checkLoopBodyRecursive(const Token *start, const Va
return nullptr; return nullptr;
} }
} else { } else {
if (const Token *errorToken = isVariableUsage(tok, var.isPointer(), alloc)) if (const Token *errtok = isVariableUsage(tok, var.isPointer(), alloc))
return errorToken; return errtok;
else if (tok->strAt(1) == "=") { else if (tok->strAt(1) == "=") {
bool varIsUsedInRhs = false; bool varIsUsedInRhs = false;
visitAstNodes(tok->next()->astOperand2(), [&](const Token * t) { visitAstNodes(tok->next()->astOperand2(), [&](const Token * t) {