Fixed -DDACA2 compiler errors

This commit is contained in:
Daniel Marjamäki 2017-06-04 14:14:42 +02:00
parent 68127adc57
commit 1439b08fbd
1 changed files with 2 additions and 2 deletions

View File

@ -200,7 +200,7 @@ void CheckFunctions::checkIgnoredReturnValue()
while (parent->astParent() && parent->astParent()->str() == "::")
parent = parent->astParent();
if (CHECK_WRONG_DATA(tok->next()->astOperand1()) && !tok->next()->astParent() && (!tok->function() || !Token::Match(tok->function()->retDef, "void %name%")) && _settings->library.isUseRetVal(tok))
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());
}
}
@ -327,7 +327,7 @@ void CheckFunctions::memsetZeroBytes()
for (const Token* tok = scope->classStart->next(); tok != scope->classEnd; tok = tok->next()) {
if (Token::Match(tok, "memset|wmemset (") && (numberOfArguments(tok)==3)) {
const std::vector<const Token *> &arguments = getArguments(tok);
if (!CHECK_WRONG_DATA(arguments.size() == 3U))
if (!CHECK_WRONG_DATA(arguments.size() == 3U, tok))
continue;
const Token* lastParamTok = arguments[2];
if (lastParamTok->str() == "0")