diff options
| author | Paul Eggert | 2022-05-27 11:27:08 -0700 |
|---|---|---|
| committer | Paul Eggert | 2022-05-27 11:45:01 -0700 |
| commit | cb57db513b3b5e2c5e09d197e63d6a921188d599 (patch) | |
| tree | 53f3a3cecb91c876ab7454b3af582ed4042f49be /src/sysstdio.h | |
| parent | 7f3d781dab9a7a153badb62fd538908cb6595105 (diff) | |
| download | emacs-cb57db513b3b5e2c5e09d197e63d6a921188d599.tar.gz emacs-cb57db513b3b5e2c5e09d197e63d6a921188d599.zip | |
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/>. */ | |||
| 28 | #include <attribute.h> | 28 | #include <attribute.h> |
| 29 | #include <unlocked-io.h> | 29 | #include <unlocked-io.h> |
| 30 | 30 | ||
| 31 | extern FILE *emacs_fopen (char const *, char const *) ATTRIBUTE_MALLOC; | 31 | extern FILE *emacs_fopen (char const *, char const *) |
| 32 | ATTRIBUTE_MALLOC ATTRIBUTE_DEALLOC (fclose, 1); | ||
| 32 | extern void errputc (int); | 33 | extern void errputc (int); |
| 33 | extern void errwrite (void const *, ptrdiff_t); | 34 | extern void errwrite (void const *, ptrdiff_t); |
| 34 | extern void close_output_streams (void); | 35 | extern void close_output_streams (void); |