Fix Cppcheck internal warning
This commit is contained in:
parent
d3f7fc92f2
commit
9cbdc262f6
|
@ -437,7 +437,7 @@ void CheckOther::checkRedundantAssignment()
|
||||||
bool trivial = true;
|
bool trivial = true;
|
||||||
visitAstNodes(tok->astOperand2(),
|
visitAstNodes(tok->astOperand2(),
|
||||||
[&](const Token *rhs) {
|
[&](const Token *rhs) {
|
||||||
if (Token::Match(rhs, "{ 0 }"))
|
if (Token::simpleMatch(rhs, "{ 0 }"))
|
||||||
return ChildrenToVisit::none;
|
return ChildrenToVisit::none;
|
||||||
if (Token::Match(rhs, "%str%|%num%|%name%") && !rhs->varId())
|
if (Token::Match(rhs, "%str%|%num%|%name%") && !rhs->varId())
|
||||||
return ChildrenToVisit::none;
|
return ChildrenToVisit::none;
|
||||||
|
|
Loading…
Reference in New Issue