RFR: 8314114: Fix -Wconversion warnings in os code, primarily linux [v3]
Thomas Stuefe
stuefe at openjdk.org
Fri Aug 11 16:13:28 UTC 2023
On Fri, 11 Aug 2023 13:19:28 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> This change fixes various -Wconversion warnings from files in the os directories and related, widening types or adding checked_cast<> where narrowing.
>> Tested with tier1 on linux/macosx/windows and tier1-4 on linux-x64-debug, windows-x64-debug.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> David's suggested changes.
src/hotspot/os/posix/signals_posix.cpp line 1432:
> 1430: // are not chained (e.g. if chaining is off), print that one too.
> 1431: void PosixSignals::print_signal_handler(outputStream* st, int sig,
> 1432: char* buf, int buflen) {
This feels weird and wrong to me. Why change what are clearly memory sizes from size_t to a signed int? These are fed from both literals (OBUFLEN) and from sizeof(buf).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15229#discussion_r1291537347
More information about the hotspot-dev
mailing list