summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-08-07 21:46:24 +0200
committerBruno Haible <bruno@clisp.org>2021-08-07 21:46:24 +0200
commit5ce620f7287c9aeb8b4b0b75c2631c0b16c1c2d5 (patch)
tree0594f651d26d40d0f553728925e244671738cc15 /lib
parent9405768cfb16bae71330a244d8025279abdac1ab (diff)
downloadgnulib-5ce620f7287c9aeb8b4b0b75c2631c0b16c1c2d5.tar.gz
javaversion: Improve GCC 11 allocation-deallocation checking.
* lib/javaversion.h: Include <stdlib.h>. (javaexec_version): Declare that deallocation must happen through 'free'.
Diffstat (limited to 'lib')
-rw-r--r--lib/javaversion.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/javaversion.h b/lib/javaversion.h
index ff5537794e..6983b289fa 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