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

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


On Fri, 11 Aug 2023 12:37:29 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/os/linux/os_linux.cpp line 1272:
>> 
>>> 1270:     fp = os::fopen("/proc/self/stat", "r");
>>> 1271:     if (fp) {
>>> 1272:       statlen = checked_cast<int>(fread(stat, 1, 2047, fp));
>> 
>> checked_cast seems unnecessary given we're reading max 2047 elements.
>
> Made statlen size_t to match fread return.

I still see "int statlen".

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

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


More information about the hotspot-dev mailing list