Skip to content

Commit 757763d

Browse files
Update checkother.cpp
1 parent 9b3b160 commit 757763d

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
@@ -633,7 +633,7 @@ void CheckOtherImpl::checkRedundantAssignment()
633633
if (Token::Match(rhs, ":: %name%") && rhs->hasKnownIntValue())
634634
return ChildrenToVisit::none;
635635
if (rhs->isCast())
636-
return ChildrenToVisit::op2;
636+
return rhs->astOperand2() ? ChildrenToVisit::op2 : ChildrenToVisit::op1;
637637
trivial = false;
638638
return ChildrenToVisit::done;
639639
});

0 commit comments

Comments
 (0)