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

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



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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-07 19:47 javaversion: 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).