fix testrunner (WRONG_DATA usage)

This commit is contained in:
Daniel Marjamäki 2017-06-05 18:49:20 +02:00
parent 150d2aa902
commit 3b805e7001
1 changed files with 2 additions and 2 deletions

View File

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