From 1439b08fbd47c4ce2ca771d7331d92e106f58d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 4 Jun 2017 14:14:42 +0200 Subject: [PATCH] Fixed -DDACA2 compiler errors --- lib/checkfunctions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/checkfunctions.cpp b/lib/checkfunctions.cpp index 9e9e7aff8..221df869a 100644 --- a/lib/checkfunctions.cpp +++ b/lib/checkfunctions.cpp @@ -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 &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")