On Mon, 7 Sep 2026 13:28:53 GMT, Matthias Baesken <[email protected]> wrote:

> Currently we switch off the unused-variable warning in BUILD_LIBJLI; this 
> should be changed.
> 
> We might also consider getting rid of the unused-function warning which is 
> switched off in BUILD_LIBJLI :
> 
> 
> /jdk/src/java.base/unix/native/libjli/java_md.h:58:17: error: 'GetJVMPath' 
> declared 'static' but never defined [-Werror=unused-function]
>    58 | static jboolean GetJVMPath(const char *jdkroot, const char *jvmtype,
>       | ^~~~~~~~~~
> /jdk/src/java.base/unix/native/libjli/java_md.h:60:17: error: 
> 'GetJDKInstallRoot' declared 'static' but never defined 
> [-Werror=unused-function]
>    60 | static jboolean GetJDKInstallRoot(char *path, jint pathsize, jboolean 
> speculative);
>       | ^~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> 
> 
> (e.g. by moving the static function declarations to the c files)
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: 014715b6
Author:    Matthias Baesken <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/014715b6a9210993d2bab0f806a833bb9c384649
Stats:     6 lines in 3 files changed: 1 ins; 3 del; 2 mod

8391912: Avoid switching off the unused-variable warning in BUILD_LIBJLI

Reviewed-by: djelinski

-------------

PR: https://git.openjdk.org/jdk/pull/32737

Reply via email to