Fixed Cppcheck warning

This commit is contained in:
Daniel Marjamäki 2017-05-13 11:06:33 +02:00
parent b85150d45a
commit 95db173e77
1 changed files with 3 additions and 1 deletions

View File

@ -1033,12 +1033,14 @@ int CheckUninitVar::isFunctionParUsage(const Token *vartok, bool pointer, Alloc
++argumentNumber;
start = start->previous();
}
if (!start)
return -1;
if (Token::simpleMatch(start->link(), ") {"))
return (!pointer || alloc == NO_ALLOC);
// is this a function call?
if (start && Token::Match(start->previous(), "%name% (")) {
if (Token::Match(start->previous(), "%name% (")) {
const bool address(vartok->previous()->str() == "&");
const bool array(vartok->variable() && vartok->variable()->isArray());
// check how function handle uninitialized data arguments..