]> Savannah Git Hosting - gnulib.git/commitdiff
javaversion: Improve GCC 11 allocation-deallocation checking.
authorBruno Haible <bruno@clisp.org>
Sat, 7 Aug 2021 19:46:24 +0000 (21:46 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 7 Aug 2021 19:46:24 +0000 (21:46 +0200)
* lib/javaversion.h: Include <stdlib.h>.
(javaexec_version): Declare that deallocation must happen through
'free'.

ChangeLog
lib/javaversion.h

index 319f2dd72a805449365876ff6e032d53454df32c..912c8cc3e142170df6d9d79ed0c3d884ea9c4e90 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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'.
+
 2021-08-07  Bruno Haible  <bruno@clisp.org>
 
        ino-map: Improve GCC 11 allocation-deallocation checking.
index ff5537794ee43ed4de07a3b3da1741dc143e194a..6983b289fa8604270563dc5baca5182bee00e4fd 100644 (file)
@@ -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