From 5f7e4b01f0c3198131ae8b796c23b01c6d326752 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 7 Aug 2021 23:11:48 +0200 Subject: [PATCH] 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'. --- ChangeLog | 7 +++++++ lib/xstriconveh.h | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) 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 -- 2.39.5