Hi,
Resource leak is not reported if c has a local scope, only because you
gave a constant value to c. Cppcheck will simplify the code in that case
by replacing c with 0 and even further, it will remove the ifs and their
content as they will never be true. If c has unknown value, you will see
the same result as you do with global variable.
It is possible not give error in this case and there is already a
upstream ticket about this, but as this false positive occurs only with
--all argument, it has a low priority.
http://sourceforge.net/apps/trac/cppcheck/ticket/482
--
Reijo
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org