From 5ce620f7287c9aeb8b4b0b75c2631c0b16c1c2d5 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 7 Aug 2021 21:46:24 +0200 Subject: [PATCH] javaversion: Improve GCC 11 allocation-deallocation checking. * lib/javaversion.h: Include . (javaexec_version): Declare that deallocation must happen through 'free'. --- ChangeLog | 7 +++++++ lib/javaversion.h | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 319f2dd72a..912c8cc3e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2021-08-07 Bruno Haible + + javaversion: Improve GCC 11 allocation-deallocation checking. + * lib/javaversion.h: Include . + (javaexec_version): Declare that deallocation must happen through + 'free'. + 2021-08-07 Bruno Haible ino-map: Improve GCC 11 allocation-deallocation checking. 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 + #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 -- 2.39.5