RFR: 8314114: Fix -Wconversion warnings in os code, primarily linux [v7]

Dean Long dlong at openjdk.org
Mon Aug 14 20:11:16 UTC 2023


On Mon, 14 Aug 2023 15:04:58 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:
> 
>   Use 'long' and fix -Wsign-compare warnings from previous edit.  Make max_len size_t in the three places.

src/hotspot/os/linux/os_linux.cpp line 745:

> 743:   Monitor* sync = osthread->startThread_lock();
> 744: 
> 745:   osthread->set_thread_id(checked_cast<int>(os::current_thread_id()));

I don't see the change @dholmes-ora.
Suggestion:

  osthread->set_thread_id(checked_cast<thread_id_t>(os::current_thread_id()));

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15229#discussion_r1293918754


More information about the hotspot-dev mailing list