From 0c09d2e222e6332a69f61524496ae2de03d3855f Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Wed, 25 Feb 2026 08:16:14 +0000 Subject: [PATCH] 8377880: Enable unused function warnings in hotspot with clang too Reviewed-by: azafari, syan, clanger, lucy --- make/hotspot/lib/CompileJvm.gmk | 2 +- test/hotspot/gtest/runtime/test_os.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk index 76e0056658c..f41693e05fb 100644 --- a/make/hotspot/lib/CompileJvm.gmk +++ b/make/hotspot/lib/CompileJvm.gmk @@ -105,7 +105,7 @@ DISABLED_WARNINGS_gcc := array-bounds comment delete-non-virtual-dtor \ DISABLED_WARNINGS_clang := delete-non-abstract-non-virtual-dtor \ invalid-offsetof missing-braces \ sometimes-uninitialized unknown-pragmas unused-but-set-variable \ - unused-function unused-local-typedef unused-private-field unused-variable + unused-local-typedef unused-private-field unused-variable ifneq ($(DEBUG_LEVEL), release) # Assert macro gives warning diff --git a/test/hotspot/gtest/runtime/test_os.cpp b/test/hotspot/gtest/runtime/test_os.cpp index 7f90a21884b..094f16a4262 100644 --- a/test/hotspot/gtest/runtime/test_os.cpp +++ b/test/hotspot/gtest/runtime/test_os.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -506,6 +506,7 @@ static inline bool can_reserve_executable_memory(void) { #define PRINT_MAPPINGS(s) { tty->print_cr("%s", s); os::print_memory_mappings((char*)p, total_range_len, tty); tty->cr(); } //#define PRINT_MAPPINGS +#ifndef _AIX // Release a range allocated with reserve_multiple carefully, to not trip mapping // asserts on Windows in os::release_memory() static void carefully_release_multiple(address start, int num_stripes, size_t stripe_len) { @@ -515,7 +516,6 @@ static void carefully_release_multiple(address start, int num_stripes, size_t st } } -#ifndef _AIX // JDK-8257041 // Reserve an area consisting of multiple mappings // (from multiple calls to os::reserve_memory) static address reserve_multiple(int num_stripes, size_t stripe_len) {