RFR: 8313882: Fix -Wconversion warnings in runtime code [v6]

Coleen Phillimore coleenp at openjdk.org
Thu Aug 10 00:31:58 UTC 2023


On Wed, 9 Aug 2023 20:23:38 GMT, Dean Long <dlong at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - put checked_cast around getc().
>>  - put checked_cast around getc().
>
> src/hotspot/share/runtime/objectMonitor.hpp line 238:
> 
>> 236:   //
>> 237:   #define OM_OFFSET_NO_MONITOR_VALUE_TAG(f) \
>> 238:     ((in_bytes(ObjectMonitor::f ## _offset())) - (int)markWord::monitor_value)
> 
> Suggestion:
> 
>     ((in_bytes(ObjectMonitor::f ## _offset())) - (intptr_t)markWord::monitor_value)

If this is intptr_t, it'll get a Wconversion warning on the uses that expect int.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15177#discussion_r1289381020


More information about the graal-dev mailing list