JDK-8311077 : Fix -Wconversion warnings in jvmti code
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-06-29
  • Updated: 2023-07-12
  • Resolved: 2023-07-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 b05Fixed
Related Reports
Relates :  
Description
JVMTI code in jvmtiClassFileReconstitutor and jvmtiRedefineClasses narrows ints into u2's to match fields in the constant pool.

These get -Wconversion warnings when implicitly narrowed.

When compiling with -Wconversion without -Werror, this was the count of occurrences in these files.

34 src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp
25 src/hotspot/share/prims/jvmtiRedefineClasses.cpp
4 src/hotspot/share/prims/jvmtiEnvBase.cpp
2 src/hotspot/share/prims/jvmtiTrace.cpp
2 src/hotspot/share/prims/jvmtiTagMapTable.hpp
2 src/hotspot/share/prims/jvmtiRawMonitor.cpp
1 src/hotspot/share/prims/jvmtiManageCapabilities.cpp
1 src/hotspot/share/prims/jvmtiExport.cpp
1 src/hotspot/share/prims/jvmtiEnvThreadState.cpp
1 src/hotspot/share/prims/jvmtiCodeBlobEvents.cpp

Comments
Changeset: cf82e315 Author: Coleen Phillimore <coleenp@openjdk.org> Date: 2023-07-05 12:30:07 +0000 URL: https://git.openjdk.org/jdk/commit/cf82e3152bba1d7332ecdc4dd57a2db2f0dc2aa8
05-07-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14710 Date: 2023-06-29 12:17:23 +0000
29-06-2023