Fixed -DDACA2 compiler errors
This commit is contained in:
parent
68127adc57
commit
1439b08fbd
|
@ -200,7 +200,7 @@ void CheckFunctions::checkIgnoredReturnValue()
|
||||||
while (parent->astParent() && parent->astParent()->str() == "::")
|
while (parent->astParent() && parent->astParent()->str() == "::")
|
||||||
parent = parent->astParent();
|
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());
|
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()) {
|
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 (!CHECK_WRONG_DATA(arguments.size() == 3U))
|
if (!CHECK_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")
|
||||||
|
|
Loading…
Reference in New Issue