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

ChangeLog
lib/striconveha.h

index 7b4a25e594f38a9839c675629b02a3fb2d38f466..aed8b7bd0aaaec0a2c76fba9e3e1a3fd6054325f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-08-07  Bruno Haible  <bruno@clisp.org>
+
+       striconveha: Improve GCC 11 allocation-deallocation checking.
+       * lib/striconveha.h: Include <stdlib.h> instead of <stddef.h>.
+       (str_iconveha): Declare that deallocation must happen through 'free'.
+
 2021-08-07  Bruno Haible  <bruno@clisp.org>
 
        striconveh: Improve GCC 11 allocation-deallocation checking.
index baa50f5aa8d4f2291b6b66294f1762a1c03adab3..5c47a44419a1b5cddf4eddf7e0ffe95ec0f9639d 100644 (file)
@@ -19,7 +19,7 @@
 #define _STRICONVEHA_H
 
 #include <stdbool.h>
-#include <stddef.h>
+#include <stdlib.h>
 
 #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: