diff --git a/CheckMemoryLeak.cpp b/CheckMemoryLeak.cpp index eb7946f5d..bc41d4fab 100644 --- a/CheckMemoryLeak.cpp +++ b/CheckMemoryLeak.cpp @@ -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; } } - } + } +*/ } } diff --git a/testmemleak.cpp b/testmemleak.cpp index 0ce861814..111731522 100644 --- a/testmemleak.cpp +++ b/testmemleak.cpp @@ -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 );