Memory leak: Fixed one more unit test

This commit is contained in:
Daniel Marjamäki 2008-11-11 19:46:08 +00:00
parent 3a39259472
commit f347efd802
2 changed files with 7 additions and 3 deletions

View File

@ -788,6 +788,11 @@ void CheckMemoryLeakClass::CheckMemoryLeak_CheckScope( const TOKEN *Tok1, const
MemoryLeak(Tokenizer::gettok(findmatch(tok, "alloc ; if continue ;"), 3), varname);
}
else if ( findmatch(tok, "alloc ; if break ;") )
{
MemoryLeak(Tokenizer::gettok(findmatch(tok, "alloc ; if break ;"), 3), varname);
}
else if ( findmatch(tok, "alloc ; if return ;") )
{
MemoryLeak(Tokenizer::gettok(findmatch(tok, "alloc ; if return ;"), 3), varname);

View File

@ -51,7 +51,7 @@ private:
// Check for memory leaks..
ShowAll = false;
FillFunctionList(0);
CheckMemoryLeakClass checkMemoryLeak;
CheckMemoryLeakClass checkMemoryLeak;
checkMemoryLeak.CheckMemoryLeak();
tokenizer.DeallocateTokens();
@ -89,7 +89,7 @@ private:
TEST_CASE( forwhile4 );
TEST_CASE( forwhile5 );
TEST_CASE( forwhile6 );
// TODO TEST_CASE( forwhile7 );
TEST_CASE( forwhile7 );
TEST_CASE( dowhile1 );
@ -494,7 +494,6 @@ private:
void forwhile7()
{
// TODO
check("void f()\n"
"{\n"
" for (int i = 0; i < j; i++)\n"