Quick fix to make Travis happy

This commit is contained in:
Daniel Marjamäki 2019-08-23 15:23:49 +02:00
parent 50c6af5e5d
commit d3f7fc92f2
1 changed files with 2 additions and 2 deletions

View File

@ -439,8 +439,8 @@ void CheckOther::checkRedundantAssignment()
[&](const Token *rhs) { [&](const Token *rhs) {
if (Token::Match(rhs, "{ 0 }")) if (Token::Match(rhs, "{ 0 }"))
return ChildrenToVisit::none; return ChildrenToVisit::none;
if (Token::Match(rhs, "0|NULL|nullptr")) if (Token::Match(rhs, "%str%|%num%|%name%") && !rhs->varId())
return ChildrenToVisit::op1_and_op2; return ChildrenToVisit::none;
if (rhs->isCast()) if (rhs->isCast())
return ChildrenToVisit::op2; return ChildrenToVisit::op2;
trivial = false; trivial = false;