Skip to content

Commit f7de7d8

Browse files
Update checkunusedvar.cpp
1 parent bee8b7b commit f7de7d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/checkunusedvar.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ void CheckUnusedVarImpl::checkFunctionVariableUsage_iterateScopes(const Scope* c
10091009
const Token * const equal = skipBracketsAndMembers(tok->next());
10101010

10111011
// checked for chained assignments
1012-
if (tok != start && equal && equal->str() == "=") {
1012+
if (tok != start && (Token::simpleMatch(equal, "=") || (start->astParent() && Token::simpleMatch(start->astParent()->astParent(), "=")))) {
10131013
const nonneg int varId = tok->varId();
10141014
const Variables::VariableUsage * const var = variables.find(varId);
10151015

0 commit comments

Comments
 (0)