RFR: 8335369: Fix -Wzero-as-null-pointer-constant warnings in ImmutableOopMapBuilder
Kim Barrett
kbarrett at openjdk.org
Tue Jul 2 05:59:28 UTC 2024
On Mon, 1 Jul 2024 01:42:12 GMT, Vladimir Kozlov <kvn 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
>
> Good.
Thanks for reviews @vnkozlov and @TheShermanTanker .
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19961#issuecomment-2201998584
More information about the hotspot-compiler-dev
mailing list