JDK-8313554 : Fix -Wconversion warnings for ResolvedFieldEntry
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-08-01
  • Updated: 2023-08-10
  • Resolved: 2023-08-04
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 b10Fixed
Related Reports
Relates :  
Description
The recent change in JDK-8301996 added more -Wconversion warnings that need to be addressed.

Also:
rewriter.cpp: In member function 'void Rewriter::rewrite_field_reference(address, int, bool)':
src/hotspot/share/interpreter/rewriter.cpp:188:29: warning: conversion from 'int' to 'u2' {aka 'short unsigned int'} may change value [-Wconversion]   
  188 |     Bytes::put_native_u2(p, field_entry_index);
      |                             ^~~~~~~~~~~~~~~~~
src/hotspot/share/interpreter/rewriter.cpp:192:27: warning: conversion from 'int' to 'u2' {aka 'short unsigned int'} may change value [-Wconversion]
  192 |     Bytes::put_Java_u2(p, pool_index); 
      |                           ^~~~~~~~~~

Comments
Changeset: ad6e9e75 Author: Matias Saavedra Silva <matsaave@openjdk.org> Date: 2023-08-04 20:24:50 +0000 URL: https://git.openjdk.org/jdk/commit/ad6e9e75bff24e74c888d9b96c3f698ae0f54127
04-08-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/15126 Date: 2023-08-02 19:15:24 +0000
02-08-2023