RFR: 8314114: Fix -Wconversion warnings in os code, primarily linux [v2]
David Holmes
dholmes at openjdk.org
Fri Aug 11 03:45:02 UTC 2023
On Thu, 10 Aug 2023 22:30:55 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/os/linux/os_linux.cpp line 3204:
>>
>>> 3202: for (int j = 0; j < cpu_map_valid_size; j++) {
>>> 3203: if (cpu_map[j] != 0) {
>>> 3204: for (int k = 0; k < BitsPerCLong; k++) {
>>
>> For changes to lines 3145 to 3204, wouldn't it be better to keep using size_t?
>
> I started that way and it required more casts. This was the path of least cast-ness.
For some reason I have an aversion to seeing a `size_t` loop index variable. These changes to `int` are a pleasant surprise. :)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15229#discussion_r1290853385
More information about the hotspot-dev
mailing list