bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* xstriconveh: Improve GCC 11 allocation-deallocation checking
@ 2021-08-07 21:12 Bruno Haible
  0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2021-08-07 21:12 UTC (permalink / raw)
  To: bug-gnulib

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'.

diff --git a/lib/xstriconveh.h b/lib/xstriconveh.h
index 63d530e..e381dd1 100644
--- a/lib/xstriconveh.h
+++ b/lib/xstriconveh.h
@@ -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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-07 21:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-07 21:12 xstriconveh: Improve GCC 11 allocation-deallocation checking Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).