diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-08-01 17:46:13 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-08-01 18:06:57 -0700 |
commit | 0fb92d9b37c5242ee12c16d08c5eddfb7754377c (patch) | |
tree | b2e9096bdeb6744039af3d5d71497bf5f39f1941 /lib | |
parent | 8136f0c50ecd74f66082c80a7f036ef5490a447c (diff) | |
download | gnulib-0fb92d9b37c5242ee12c16d08c5eddfb7754377c.tar.gz |
xmalloca: improve -fanalyzer malloc checking
Diffstat (limited to 'lib')
-rw-r--r-- | lib/xmalloca.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/xmalloca.h b/lib/xmalloca.h index dbc648697e..6fec3de61a 100644 --- a/lib/xmalloca.h +++ b/lib/xmalloca.h @@ -39,7 +39,9 @@ extern "C" { + (2 * sa_alignment_max - 1)) \ & ~(uintptr_t)(2 * sa_alignment_max - 1)) \ : xmmalloca (N)) -extern void * xmmalloca (size_t n); +extern void * xmmalloca (size_t n) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (freea, 1) + _GL_ATTRIBUTE_ALLOC_SIZE ((1)) _GL_ATTRIBUTE_RETURNS_NONNULL; #else # define xmalloca(N) \ xmalloc (N) |