RFR: 8350623: Fix -Wzero-as-null-pointer-constant warnings in nsk native test utilities

Kim Barrett kbarrett at openjdk.org
Mon Mar 3 15:57:07 UTC 2025


On Mon, 3 Mar 2025 14:58:35 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Please review this trivial change to remove a use of literal zero as a null
>> pointer constant.
>> 
>> Testing: mach5 tier1
>> Locally tested (linux-x64) with -Wzero-as-null-pointer-constant enabled to
>> verify the warnings associated with this code were removed.
>
> Looks good plus trivial.

Thanks for reviewing @coleenp

> test/hotspot/jtreg/vmTestbase/nsk/share/native/native_thread.cpp line 101:
> 
>> 99:     thread->status   = thread->procedure(thread->context);
>> 100:     thread->finished = 1;
>> 101: #ifdef windows
> 
> Lower case 'windows' ??  Not an issue for your change, but odd.

Yeah, it's a bit odd.  It's defined up at the top of the file, based on whether `_WIN32` is defined.  I've no
idea why `_WIN32` isn't just used instead.

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

PR Comment: https://git.openjdk.org/jdk/pull/23797#issuecomment-2694835712
PR Review Comment: https://git.openjdk.org/jdk/pull/23797#discussion_r1977758693


More information about the hotspot-runtime-dev mailing list