RFR: 8314114: Fix -Wconversion warnings in os code, primarily linux [v2]
David Holmes
dholmes at openjdk.org
Mon Aug 14 02:48:59 UTC 2023
On Mon, 14 Aug 2023 02:21:22 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> src/hotspot/os/linux/os_linux.cpp:745:48: warning: conversion from 'intx' {aka 'long int'} to 'OSThread::thread_id_t' {aka 'int'} may change value [-Wconversion]
>> 745 | osthread->set_thread_id(os::current_thread_id());
>> | ~~~~~~~~~~~~~~~~~~~~~^~
>
> I understand there is a conversion warning, but it seems wrong to `check_cast<int>` when the expected type is `thread_id_t` (which just happens to be an `int`).
I see this has been changed now - thanks.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15229#discussion_r1292923264
More information about the hotspot-dev
mailing list