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

Kim Barrett kbarrett at openjdk.org
Mon Aug 12 07:14:00 UTC 2024


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

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

Commit messages:
 - mutex initializers

Changes: https://git.openjdk.org/jdk/pull/20537/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20537&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8338155
  Stats: 20 lines in 4 files changed: 16 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/20537.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20537/head:pull/20537

PR: https://git.openjdk.org/jdk/pull/20537


More information about the hotspot-dev mailing list