diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2022-05-27 11:27:08 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2022-05-27 11:45:01 -0700 |
| commit | cb57db513b3b5e2c5e09d197e63d6a921188d599 (patch) | |
| tree | 53f3a3cecb91c876ab7454b3af582ed4042f49be /src/sysstdio.h | |
| parent | 7f3d781dab9a7a153badb62fd538908cb6595105 (diff) | |
Add ATTRIBUTE_DEALLOC to extern functions
This can help static checking. It’s not as important for static
functions, where GCC can figure this stuff out own its own.
* src/sysstdio.h (emacs_fopen): Add ATTRIBUTE_DEALLOC (fclose, 1).
* src/tparam.h (tparam): Add ATTRIBUTE_DEALLOC_FREE.
Include stdlib.h so that ‘free’ is declared.
* src/xterm.h (x_get_atom_name): Add ATTRIBUTE_DEALLOC_FREE.
Diffstat (limited to 'src/sysstdio.h')
| -rw-r--r-- | src/sysstdio.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sysstdio.h b/src/sysstdio.h index 727a466be52..efedc3e450b 100644 --- a/src/sysstdio.h +++ b/src/sysstdio.h @@ -28,7 +28,8 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ #include <attribute.h> #include <unlocked-io.h> -extern FILE *emacs_fopen (char const *, char const *) ATTRIBUTE_MALLOC; +extern FILE *emacs_fopen (char const *, char const *) + ATTRIBUTE_MALLOC ATTRIBUTE_DEALLOC (fclose, 1); extern void errputc (int); extern void errwrite (void const *, ptrdiff_t); extern void close_output_streams (void); |
