From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: striconveh: Improve GCC 11 allocation-deallocation checking
Date: Sat, 07 Aug 2021 22:11:21 +0200 [thread overview]
Message-ID: <13579224.UUfyFWYlo9@omega> (raw)
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'.
diff --git a/lib/striconveh.h b/lib/striconveh.h
index bd8e0fe..60c6329 100644
--- a/lib/striconveh.h
+++ b/lib/striconveh.h
@@ -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
reply other threads:[~2021-08-07 20:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=13579224.UUfyFWYlo9@omega \
--to=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).