RFR: 8314114: Fix -Wconversion warnings in os code, primarily linux [v2]
David Holmes
dholmes at openjdk.org
Mon Aug 14 02:37:29 UTC 2023
On Fri, 11 Aug 2023 12:23:55 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/os/posix/os_posix.cpp:1211:31: warning: conversion from 'long int' to 'int' may change value [-Wconversion]
>> 1211 | clock_tics_per_sec = sysconf(_SC_CLK_TCK);
>> | ~~~~~~~^~~~~~~~~~~~~
>
> Although I did the opposite for the linux version (ie casted the result of sysconf instead).
I'm really starting to think we should just be using `long` in platform specific code, given it acts the same as `intx` on this platform.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15229#discussion_r1292918965
More information about the hotspot-dev
mailing list