RFR: 8314114: Fix -Wconversion warnings in os code, primarily linux [v5]
Coleen Phillimore
coleenp at openjdk.org
Sat Aug 12 13:42:29 UTC 2023
On Sat, 12 Aug 2023 06:35:19 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Put back size_t parameter for print_signal_handlers and add a checked_cast<> future could fix the dll_address_to_x functions.
>
> src/hotspot/os/linux/os_linux.cpp line 3151:
>
>> 3149: // are more reasonable) we'll just hardcode the number they use
>> 3150: // in the library.
>> 3151: const int BitsPerCLong = (int)sizeof(long) * CHAR_BIT;
>
> suggestion here and above: constexpr?
? They're already const . Isn't that the same?
> src/hotspot/os/linux/os_linux.cpp line 3352:
>
>> 3350: for (int index = 0; index < loops && !found_range; index ++) {
>> 3351: assert(pages > 0, "Nothing to do");
>> 3352: size_t pages_to_query = (pages >= stripe) ? stripe : pages;
>
> Pre-existing: Could you instead make `pages` and `pages_to_query` and below `vecIdx` an uintx? Should be the same and give you no new errors, but size_t as "number of things" is not right.
This seems to not complain.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15229#discussion_r1292284440
PR Review Comment: https://git.openjdk.org/jdk/pull/15229#discussion_r1292301082
More information about the hotspot-dev
mailing list