RFR: 8338155: Fix -Wzero-as-null-pointer-constant warnings involving PTHREAD_MUTEX_INITIALIZER

Kim Barrett kbarrett at openjdk.org
Tue Aug 13 07:30:59 UTC 2024


On Mon, 12 Aug 2024 11:13:13 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Please review this change to remove -Wzero-as-null-pointer-constant warnings
>> involving the use of PTHREAD_MUTEX_INITIALIZER.  We obviously can't change the
>> initializer macro, and we can't avoid it.  So we suppress that warning where
>> the initializer is used.
>> 
>> This involved adding a suppression pragma macro for that warning, which we
>> haven't needed for any of the previous work on removing them.  Hopefully we
>> won't need it for many (or any) other places, but there are still a few places
>> triggering that warning, and not all of them are otherwise simple to resolve.
>> 
>> Testing: mach5 tier1
>
> I would expect there is an upstream bug to fix this - seems crazy we have to workaround it.
> 
> Changes look fine though.
> 
> Thanks

Thanks for reviews @dholmes-ora and @dean-long

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

PR Comment: https://git.openjdk.org/jdk/pull/20537#issuecomment-2285536811


More information about the hotspot-dev mailing list