Skip to content

Commit 83c0d93

Browse files
Update checkother.cpp [skip ci]
1 parent 0155858 commit 83c0d93

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/checkother.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ void CheckOtherImpl::checkRedundantAssignment()
640640
if (Token::Match(rhs, ":: %name%") && rhs->hasKnownIntValue())
641641
return ChildrenToVisit::none;
642642
if (rhs->isCast())
643-
return ChildrenToVisit::op2;
643+
return rhs->astOperand2() ? ChildrenToVisit::op2 : ChildrenToVisit::op1;
644644
trivial = false;
645645
return ChildrenToVisit::done;
646646
});

0 commit comments

Comments
 (0)