memleak: commented out the switch handling temporarily. it causes
segmentation faults when checking the linux kernel.
This commit is contained in:
parent
ae322b5f45
commit
b88fd769a7
|
@ -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 {"))
|
||||
{
|
||||
|
@ -514,7 +514,8 @@ static void CheckMemoryLeak_CheckScope( const TOKEN *Tok1, const char varname[]
|
|||
tok2 = tok2->next->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in New Issue