1 parent 8234674 commit 5030611Copy full SHA for 5030611
1 file changed
lib/checkother.cpp
@@ -599,7 +599,7 @@ static bool isAssignment(const Token* tok) {
599
return false;
600
if (tok->isAssignmentOp() || tok->tokType() == Token::eIncDecOp)
601
return true;
602
- return Token::Match(tok, "[{(]") && tok->astOperand1()->variable() && tok->astOperand1() == tok->astOperand1()->variable()->nameToken();
+ return Token::Match(tok, "[{(]") && tok->astOperand1()->variable() && tok->astOperand1() == tok->astOperand1()->variable()->nameToken();
603
}
604
605
void CheckOtherImpl::checkRedundantAssignment()
@@ -646,7 +646,7 @@ void CheckOtherImpl::checkRedundantAssignment()
646
});
647
if (trivial)
648
continue;
649
- }
+ }
650
651
const Token* rhs = tok->astOperand2();
652
// Do not warn about assignment with 0 / NULL
0 commit comments