From: Bruno Haible Date: Sat, 7 Aug 2021 21:11:48 +0000 (+0200) Subject: xstriconveh: Improve GCC 11 allocation-deallocation checking. X-Git-Tag: v1.0~2685 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=5f7e4b01f0c3198131ae8b796c23b01c6d326752;p=gnulib.git xstriconveh: Improve GCC 11 allocation-deallocation checking. * lib/xstriconveh.h: Include instead of . (xstr_cd_iconveh, xstr_iconveh): Declare that deallocation must happen through 'free'. --- diff --git a/ChangeLog b/ChangeLog index 336da1deb6..7dccacbb46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2021-08-07 Bruno Haible + + xstriconveh: Improve GCC 11 allocation-deallocation checking. + * lib/xstriconveh.h: Include instead of . + (xstr_cd_iconveh, xstr_iconveh): Declare that deallocation must happen + through 'free'. + 2021-08-07 Bruno Haible xmemdup0: Improve GCC 11 allocation-deallocation checking. diff --git a/lib/xstriconveh.h b/lib/xstriconveh.h index 63d530e43f..e381dd16b9 100644 --- a/lib/xstriconveh.h +++ b/lib/xstriconveh.h @@ -18,7 +18,7 @@ #ifndef _XSTRICONVEH_H #define _XSTRICONVEH_H -#include +#include /* Get the 'enum iconv_ilseq_handler' and iconveh_t types, and the iconveh_open, iconveh_close declarations. */ @@ -68,7 +68,8 @@ extern int extern char * xstr_cd_iconveh (const char *src, const iconveh_t *cd, - enum iconv_ilseq_handler handler); + enum iconv_ilseq_handler handler) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; #endif @@ -104,7 +105,8 @@ extern int extern char * xstr_iconveh (const char *src, const char *from_codeset, const char *to_codeset, - enum iconv_ilseq_handler handler); + enum iconv_ilseq_handler handler) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; #ifdef __cplusplus