Skip to content

Commit 06289f3

Browse files
committed
8351821: VMManagementImpl.c avoid switching off warnings
Reviewed-by: ihse, kevinw
1 parent 0460978 commit 06289f3

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

make/modules/java.management/Lib.gmk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ include LibCommon.gmk
3434
$(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT, \
3535
NAME := management, \
3636
OPTIMIZATION := HIGH, \
37-
DISABLED_WARNINGS_gcc_VMManagementImpl.c := unused-variable, \
38-
DISABLED_WARNINGS_clang_VMManagementImpl.c := unused-variable, \
3937
JDK_LIBS := java.base:libjava java.base:libjvm, \
4038
LIBS_aix := -lperfstat, \
4139
LIBS_windows := advapi32.lib psapi.lib, \

src/java.management/share/native/libmanagement/VMManagementImpl.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -37,13 +37,9 @@ Java_sun_management_VMManagementImpl_getVersion0
3737
{
3838
char buf[MAX_VERSION_LEN];
3939
jstring version_string = NULL;
40-
4140
unsigned int major = ((unsigned int) jmm_version & 0x0FFF0000) >> 16;
4241
unsigned int minor = ((unsigned int) jmm_version & 0xFF00) >> 8;
4342

44-
// for internal use
45-
unsigned int micro = (unsigned int) jmm_version & 0xFF;
46-
4743
snprintf(buf, sizeof(buf), "%d.%d", major, minor);
4844
version_string = (*env)->NewStringUTF(env, buf);
4945
return version_string;
@@ -64,7 +60,7 @@ Java_sun_management_VMManagementImpl_initOptionalSupportFields
6460
(JNIEnv *env, jclass cls)
6561
{
6662
jmmOptionalSupport mos;
67-
jint ret = jmm_interface->GetOptionalSupport(env, &mos);
63+
jmm_interface->GetOptionalSupport(env, &mos);
6864

6965
jboolean value;
7066

0 commit comments

Comments
 (0)