filter.c:71:7: error: Return value of allocation function 'freopen' is not
stored. [leakReturnValNotUsed]
if (freopen(NULL, "w+b", imf) == NULL) die( errno, LOC );
Since freopen() returns either imf or NULL, cppcheck should accept this line of
code. This error report is probably the result of some general logic from which
freopen() should be exempted.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
From: https://bugzilla.redhat.com/show_bug.cgi?id=2400880
filter.c:71:7: error: Return value of allocation function 'freopen' is not
stored. [leakReturnValNotUsed]
if (freopen(NULL, "w+b", imf) == NULL) die( errno, LOC );
Since freopen() returns either imf or NULL, cppcheck should accept this line of
code. This error report is probably the result of some general logic from which
freopen() should be exempted.
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14171
Thank you!