I was wondering in general whether checking previously "loop unrolled" loops for (0, 1, and 2 times round - or user configurable) might be one way to proceed?
Neil
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
cppcheck --force --enable=all --inconclusive -DLOOP=2 for_loop_hides_leak.c
doesn't detect the memory leak (assignment to the same pointer):
I was wondering in general whether checking previously "loop unrolled" loops for (0, 1, and 2 times round - or user configurable) might be one way to proceed?
Neil
This FN is still not detected in v2.3, unless the loop is unrolled.
There already is a related ticket: https://trac.cppcheck.net/ticket/10050