memleak: removed false positives for pclose (#286)

This commit is contained in:
Daniel Marjamäki 2009-05-06 21:31:31 +02:00
parent 51beadd81c
commit a32114b15c
2 changed files with 2 additions and 2 deletions

View File

@ -486,7 +486,7 @@ Token *CheckMemoryLeakClass::getcode(const Token *tok, std::list<const Token *>
}
}
if (Token::Match(tok->previous(), "[;{})] %var%"))
if (Token::Match(tok->previous(), "[;{})=] %var%"))
{
AllocType dealloc = GetDeallocationType(tok, varnames);
if (dealloc != No)

View File

@ -2119,7 +2119,7 @@ private:
" FILE *f = popen (\"test\", \"w\");\n"
" int a = pclose(f);\n"
"}\n");
TODO_ASSERT_EQUALS(std::string(""), errout.str());
ASSERT_EQUALS(std::string(""), errout.str());
}
};