Remove dead code in CheckMemoryLeakInFunction::call_func() (Coverity CID 1257017)
This commit is contained in:
parent
03fcac98a9
commit
cef324435f
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue