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

Jiu Fu Guo <guojiufu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |guojiufu at gcc dot gnu.org

--- Comment #1 from Jiu Fu Guo <guojiufu at gcc dot gnu.org> ---
The case only checkes [CWE-1341] which is `double-fclose`.
While on the BE machine, besides [CWE-1341], a message of [CWE-415] is also
reported. Because attribute `malloc` is 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;
```

Because this case is not intended to test CWE-415, it may be ok to add
-Wno-analyzer-double-free for this case.

Reply via email to