Menu

Trying to fix #2830 (again)

versat
2018-01-29
2018-02-06
  • versat

    versat - 2018-01-29

    Tried to fix https://trac.cppcheck.net/ticket/2830 again:

    I saw the TODO in the test/cfg/posix.c line 145 ff:

        /* TODO: add configuration for open/fdopen
            // #2830
            int fd = open("path", O_RDONLY);
            FILE *f = fdopen(fd, "rt");
            fclose(f);
        */
    

    I disabled it and got:
    "test/cfg/posix.c:148:information:checkLibraryUseIgnore:--check-library: Function fdopen() should have <use>/<leak-ignore> configuration"
    That makes sense, so i added the <use>:

      <resource>
        <alloc init="true">open</alloc>
        <alloc init="true">creat</alloc>
        <alloc init="true">socket</alloc>
        <use>fdopen</use>
        <dealloc>close</dealloc>
      </resource>
    

    But i still get the message that the same --check-library message, like the <use> is ignored somehow.
    The only other places where <use> is used is in gtk.cfg for which no tests exist.
    Shall i reopen ticket 2830 and update it or better create a new ticket?
    Any idea what can be wrong?

     
  • Daniel Marjamäki

    feel free to create a new ticket.

     
  • versat

    versat - 2018-02-06

    For the record: I created the ticket https://trac.cppcheck.net/ticket/8380

     

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.