Remove dead code in CheckMemoryLeakInFunction::call_func() (Coverity CID 1257017)

This commit is contained in:
Alexander Mai 2014-12-09 20:34:30 +01:00
parent 03fcac98a9
commit cef324435f
1 changed files with 1 additions and 3 deletions

View File

@ -606,7 +606,7 @@ const char * CheckMemoryLeakInFunction::call_func(const Token *tok, std::list<co
}
// how many parameters is there in the function call?
unsigned int numpar = countParameters(tok);
const unsigned int numpar = countParameters(tok);
if (numpar == 0) {
// Taking return value => it is not a noreturn function
if (tok->strAt(-1) == "=")
@ -636,8 +636,6 @@ const char * CheckMemoryLeakInFunction::call_func(const Token *tok, std::list<co
for (; tok; tok = tok->nextArgument()) {
++par;
if (varid == 0)
continue;
if (Token::Match(tok, "%varid% [,()]", varid)) {
if (dot)
return "use";