CheckMemoryLeak: Fixed a bug: Don't erase "{ }", replace with ";"
This commit is contained in:
parent
6bdb2ff0dc
commit
e64eed909b
|
@ -699,10 +699,11 @@ static void CheckMemoryLeak_CheckScope( const TOKEN *Tok1, const char varname[]
|
||||||
done = false;
|
done = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete empty block
|
// Replace "{ }" with ";"
|
||||||
if ( Match(tok2->next, "{ }") )
|
if ( Match(tok2->next, "{ }") )
|
||||||
{
|
{
|
||||||
erase(tok2, gettok(tok2,3));
|
tok2->next->str[0] = ';';
|
||||||
|
erase(tok2->next, gettok(tok2,3));
|
||||||
done = false;
|
done = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue