From 21884ba6ddab17cc9dd05c92b6b31943f3173db8 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 7 Aug 2021 22:14:02 +0200 Subject: [PATCH] striconveha: Improve GCC 11 allocation-deallocation checking. * lib/striconveha.h: Include instead of . (str_iconveha): Declare that deallocation must happen through 'free'. --- ChangeLog | 6 ++++++ lib/striconveha.h | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7b4a25e594..aed8b7bd0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-08-07 Bruno Haible + + striconveha: Improve GCC 11 allocation-deallocation checking. + * lib/striconveha.h: Include instead of . + (str_iconveha): Declare that deallocation must happen through 'free'. + 2021-08-07 Bruno Haible striconveh: Improve GCC 11 allocation-deallocation checking. diff --git a/lib/striconveha.h b/lib/striconveha.h index baa50f5aa8..5c47a44419 100644 --- a/lib/striconveha.h +++ b/lib/striconveha.h @@ -19,7 +19,7 @@ #define _STRICONVEHA_H #include -#include +#include #include "iconveh.h" @@ -69,7 +69,8 @@ extern char * str_iconveha (const char *src, const char *from_codeset, const char *to_codeset, bool transliterate, - enum iconv_ilseq_handler handler); + enum iconv_ilseq_handler handler) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; /* In the above, FROM_CODESET can also be one of the following values: -- 2.39.5