Menu

False positive: freopen

6 days ago
5 days ago
  • Gwyn Ciesla

    Gwyn Ciesla - 6 days ago

    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.

     
  • CHR

    CHR - 6 days ago

    Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14171

     
  • Gwyn Ciesla

    Gwyn Ciesla - 5 days ago

    Thank you!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.