summaryrefslogtreecommitdiff
path: root/src/tparam.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-05-27 11:27:08 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2022-05-27 11:45:01 -0700
commitcb57db513b3b5e2c5e09d197e63d6a921188d599 (patch)
tree53f3a3cecb91c876ab7454b3af582ed4042f49be /src/tparam.h
parent7f3d781dab9a7a153badb62fd538908cb6595105 (diff)
downloademacs-cb57db513b3b5e2c5e09d197e63d6a921188d599.tar.gz
emacs-cb57db513b3b5e2c5e09d197e63d6a921188d599.tar.bz2
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/tparam.h')
-rw-r--r--src/tparam.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tparam.h b/src/tparam.h
index 653f01bdde0..4f4bdc8820f 100644
--- a/src/tparam.h
+++ b/src/tparam.h
@@ -20,6 +20,8 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#ifndef EMACS_TPARAM_H
#define EMACS_TPARAM_H
+#include <stdlib.h>
+
#include <attribute.h>
/* Don't try to include termcap.h. On some systems, configure finds a
@@ -32,7 +34,8 @@ int tgetnum (const char *);
char *tgetstr (const char *, char **);
char *tgoto (const char *, int, int);
-char *tparam (const char *, char *, int, int, int, int, int) ATTRIBUTE_MALLOC;
+char *tparam (const char *, char *, int, int, int, int, int)
+ ATTRIBUTE_MALLOC ATTRIBUTE_DEALLOC_FREE;
extern char PC;
extern char *BC;