Integrated: 8335369: Fix -Wzero-as-null-pointer-constant warnings in ImmutableOopMapBuilder
Kim Barrett
kbarrett at openjdk.org
Tue Jul 2 05:59:29 UTC 2024
On Sun, 30 Jun 2024 22:08:16 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> 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
This pull request has now been integrated.
Changeset: 318d9aca
Author: Kim Barrett <kbarrett at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/318d9acadf305f9d7d0cd8bb54b41506dd9914a8
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
8335369: Fix -Wzero-as-null-pointer-constant warnings in ImmutableOopMapBuilder
Reviewed-by: kvn, jwaters
-------------
PR: https://git.openjdk.org/jdk/pull/19961
More information about the hotspot-compiler-dev
mailing list