RFR: 8313785: Fix -Wconversion warnings in prims code

Coleen Phillimore coleenp at openjdk.org
Fri Aug 4 14:44:40 UTC 2023


This patch fixes Wconversion in code in the src/hotspot/share/prims directory.  Most of the changes correct the types.  jfieldID's are created with the int offset returned by InstanceKlass::field_offset().
     int     field_offset      (int index) const { return field(index).offset(); }

So when we get the field offset back, it's an int.

Also stackwalker passes jlong, so made that consistent.

Tested with tier1 on Oracle supported platforms.

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

Commit messages:
 - Fix -Wconversion warnings in prims

Changes: https://git.openjdk.org/jdk/pull/15160/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15160&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8313785
  Stats: 38 lines in 11 files changed: 6 ins; 0 del; 32 mod
  Patch: https://git.openjdk.org/jdk/pull/15160.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15160/head:pull/15160

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


More information about the serviceability-dev mailing list