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

David Holmes dholmes at openjdk.org
Mon Aug 12 11:15:31 UTC 2024


On Mon, 12 Aug 2024 07:08:56 GMT, Kim Barrett <kbarrett 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

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20537#pullrequestreview-2232692694


More information about the hotspot-dev mailing list