calling unknown function -> use

This commit is contained in:
Daniel Marjamäki 2009-06-23 20:37:34 +02:00
parent 13ca5f89be
commit 7f8b40d135
1 changed files with 2 additions and 0 deletions

View File

@ -486,6 +486,8 @@ const char * CheckMemoryLeakInFunction::call_func(const Token *tok, std::list<co
if (Token::Match(tok, pattern.c_str()))
{
const Token *ftok = _tokenizer->GetFunctionTokenByName(funcname.c_str());
if (!ftok)
return "use";
// how many parameters does the function want?
if (numpar != countParameters(ftok))