From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: javaversion: Improve GCC 11 allocation-deallocation checking
Date: Sat, 07 Aug 2021 21:47:30 +0200 [thread overview]
Message-ID: <10315610.RSb85LWaMO@omega> (raw)
2021-08-07 Bruno Haible <bruno@clisp.org>
javaversion: Improve GCC 11 allocation-deallocation checking.
* lib/javaversion.h: Include <stdlib.h>.
(javaexec_version): Declare that deallocation must happen through
'free'.
diff --git a/lib/javaversion.h b/lib/javaversion.h
index ff55377..6983b28 100644
--- a/lib/javaversion.h
+++ b/lib/javaversion.h
@@ -18,6 +18,8 @@
#ifndef _JAVAVERSION_H
#define _JAVAVERSION_H
+#include <stdlib.h>
+
#ifdef __cplusplus
extern "C" {
@@ -28,7 +30,8 @@ extern "C" {
This is the value of System.getProperty("java.specification.version").
Some possible values are: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 9, 10, 11.
Return NULL if the Java version cannot be determined. */
-extern char * javaexec_version (void);
+extern char * javaexec_version (void)
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;
#ifdef __cplusplus
reply other threads:[~2021-08-07 19:47 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=10315610.RSb85LWaMO@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).