RFR: 8335369: Fix -Wzero-as-null-pointer-constant warnings in ImmutableOopMapBuilder

Kim Barrett kbarrett at openjdk.org
Sun Jun 30 22:12:31 UTC 2024


Please review this change to ImmutableOopMapBuilder::set.  It used to have 2
OopMap* arguments that defaulted to 0, triggering -Wzero-as-null-pointer-constant
if that warning is enabled.

The first of those arguments is being changed from optional to required.  All
callers provide it.  This removes 1/2 the warnings.

The second of those arguments is being changed to default to nullptr, removing
the other 1/2 of the warnings.

This removes about 25% of the -Wzero-as-null-pointer-constant warnings when
building with that option.

Testing: mach5 tier1

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

Commit messages:
 - fix ImmutableOopMapBuilder

Changes: https://git.openjdk.org/jdk/pull/19961/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19961&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8335369
  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/19961.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19961/head:pull/19961

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


More information about the hotspot-compiler-dev mailing list