avoid some WrongData warnings
This commit is contained in:
parent
0c6a551039
commit
20b27cfd51
|
@ -196,11 +196,7 @@ void CheckFunctions::checkIgnoredReturnValue()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Token* parent = tok;
|
if ((!tok->function() || !Token::Match(tok->function()->retDef, "void %name%")) && _settings->library.isUseRetVal(tok) && CHECK_WRONG_DATA(tok->next()->astOperand1(), tok))
|
||||||
while (parent->astParent() && parent->astParent()->str() == "::")
|
|
||||||
parent = parent->astParent();
|
|
||||||
|
|
||||||
if (CHECK_WRONG_DATA(tok->next()->astOperand1(), tok) && !tok->next()->astParent() && (!tok->function() || !Token::Match(tok->function()->retDef, "void %name%")) && _settings->library.isUseRetVal(tok))
|
|
||||||
ignoredReturnValueError(tok, tok->next()->astOperand1()->expressionString());
|
ignoredReturnValueError(tok, tok->next()->astOperand1()->expressionString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue