On Sat, 5 Aug 2023 16:21:57 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:

>> 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.
>
> Coleen Phillimore has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Dean's suggested changes.

The stackwalking code uses jlong and passes it to some functions that take int 
so gets warnings if the mode argument is inconsistent. This change makes it 
consistent and avoids the warnings.  The Java code uses it as long.  If this 
should be changed to int (which makes more sense), it should be done as a 
separate change.  We can file another RFE for that.

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

PR Comment: https://git.openjdk.org/jdk/pull/15160#issuecomment-1667729889

Reply via email to