]> Savannah Git Hosting - gnulib.git/commitdiff
striconveh: Improve GCC 11 allocation-deallocation checking.
authorBruno Haible <bruno@clisp.org>
Sat, 7 Aug 2021 20:10:29 +0000 (22:10 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 7 Aug 2021 20:10:29 +0000 (22:10 +0200)
* lib/striconveh.h: Include <stdlib.h> instead of <stddef.h>.
(str_cd_iconveh, str_iconveh): Declare that deallocation must happen
through 'free'.

ChangeLog
lib/striconveh.h

index 3d25b0301852682c4a942c8e6babb3e433c3e721..7b4a25e594f38a9839c675629b02a3fb2d38f466 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-08-07  Bruno Haible  <bruno@clisp.org>
+
+       striconveh: Improve GCC 11 allocation-deallocation checking.
+       * lib/striconveh.h: Include <stdlib.h> instead of <stddef.h>.
+       (str_cd_iconveh, str_iconveh): Declare that deallocation must happen
+       through 'free'.
+
 2021-08-07  Bruno Haible  <bruno@clisp.org>
 
        striconv: Improve GCC 11 allocation-deallocation checking.
index bd8e0fea0578a6fdcaca5e57cef921def05af3e8..60c632928fae5560fba42015cf5310dda87a749a 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef _STRICONVEH_H
 #define _STRICONVEH_H
 
-#include <stddef.h>
+#include <stdlib.h>
 #if HAVE_ICONV
 #include <iconv.h>
 #endif
@@ -95,7 +95,8 @@ extern int
 extern char *
        str_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
 
@@ -129,7 +130,8 @@ extern int
 extern char *
        str_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