memleak: commented out the switch handling temporarily. it causes

segmentation faults when checking the linux kernel.
This commit is contained in:
Daniel Marjamäki 2008-08-30 18:42:26 +00:00
parent ae322b5f45
commit b88fd769a7
2 changed files with 7 additions and 6 deletions

View File

@ -146,14 +146,14 @@ static void MemoryLeak( const TOKEN *tok, const char varname[] )
ReportErr( errmsg.str() );
}
//---------------------------------------------------------------------------
/*
static void instoken(TOKEN *tok, const char str[])
{
TOKEN *newtok = new TOKEN;
memcpy( newtok, tok, sizeof(TOKEN) );
newtok->str = strdup(str);
tok->next = newtok;
}
}*/
//---------------------------------------------------------------------------
@ -453,7 +453,7 @@ static void CheckMemoryLeak_CheckScope( const TOKEN *Tok1, const char varname[]
erase(tok2, gettok(tok2,3));
done = false;
}
/*
// Replace switch with if (if not complicated)
if (Match(tok2, "switch {"))
{
@ -515,6 +515,7 @@ static void CheckMemoryLeak_CheckScope( const TOKEN *Tok1, const char varname[]
}
}
}
*/
}
}

View File

@ -49,8 +49,8 @@ public:
TEST_CASE( forwhile3 );
TEST_CASE( forwhile4 );
TEST_CASE( switch1 );
TEST_CASE( switch2 );
//TEST_CASE( switch1 );
//TEST_CASE( switch2 );
TEST_CASE( mismatch1 );