https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108722

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jiu Fu Guo <guoji...@gcc.gnu.org>:

https://gcc.gnu.org/g:edc6659c97c4a747123b1150b372dc8e7a83a824

commit r13-7176-gedc6659c97c4a747123b1150b372dc8e7a83a824
Author: Jiufu Guo <guoji...@linux.ibm.com>
Date:   Wed Apr 12 10:12:58 2023 +0800

    testsuite: filter out warning noise for CWE-1341 test

    The case file-CWE-1341-example.c checkes [CWE-1341](`double-fclose`).
    While on some systems, besides [CWE-1341], a message of [CWE-415] is
    also reported. On those systems, attribute `malloc` may be attached on
    fopen:
    ```
    # 258 "/usr/include/stdio.h" 3 4
    extern FILE *fopen (const char *__restrict __filename,
          const char *__restrict __modes)
      __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) ;

    or say: __attribute_malloc__ __attr_dealloc_fclose __wur;
    ```

    See (PR analyzer/108722) for future fix in the analyzer.
    This workaround patch adds -Wno-analyzer-double-free to this case.

    gcc/testsuite/ChangeLog:

            PR analyzer/108722
            * gcc.dg/analyzer/file-CWE-1341-example.c: Update.

Reply via email to