]> Savannah Git Hosting - gnulib.git/commitdiff
xstriconveh: Improve GCC 11 allocation-deallocation checking.
authorBruno Haible <bruno@clisp.org>
Sat, 7 Aug 2021 21:11:48 +0000 (23:11 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 7 Aug 2021 21:11:48 +0000 (23:11 +0200)
* lib/xstriconveh.h: Include <stdlib.h> instead of <stddef.h>.
(xstr_cd_iconveh, xstr_iconveh): Declare that deallocation must happen
through 'free'.

ChangeLog
lib/xstriconveh.h

index 336da1deb67b6e43646ca6a96f8ac628dea1c125..7dccacbb46750837f9debecafc9a7a6c890b94e0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-08-07  Bruno Haible  <bruno@clisp.org>
+
+       xstriconveh: Improve GCC 11 allocation-deallocation checking.
+       * lib/xstriconveh.h: Include <stdlib.h> instead of <stddef.h>.
+       (xstr_cd_iconveh, xstr_iconveh): Declare that deallocation must happen
+       through 'free'.
+
 2021-08-07  Bruno Haible  <bruno@clisp.org>
 
        xmemdup0: Improve GCC 11 allocation-deallocation checking.
index 63d530e43fdf018c33eb0d0c4c8183f291414730..e381dd16b9574e1b789f2921bc69c449b69f98d8 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef _XSTRICONVEH_H
 #define _XSTRICONVEH_H
 
-#include <stddef.h>
+#include <stdlib.h>
 
 /* 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