RFR: 8338330: Fix -Wzero-as-null-pointer-constant warnings from THROW_XXX_0
David Holmes
dholmes at openjdk.org
Tue Aug 13 22:55:48 UTC 2024
On Tue, 13 Aug 2024 22:19:45 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this change to add THROW_ARG_NULL and THROW_HANDLE_NULL macros,
> and use them instead of the corresponding THROW_XXX_0 macros in contexts where
> a pointer value is needed. This removes some -Wzero-as-null-pointer-constant
> warnings.
>
> There aren't many uses of either (only one of the HANDLE variant). An
> alternative would have been to change the callers to use the unsuffixed
> variant with a nullptr value argument. Adding the macros is consistent with
> other THROW variants, and seems a little bit more readable.
>
> Testing: mach5 tier1
Okay. Thanks
-------------
Marked as reviewed by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20574#pullrequestreview-2236776583
More information about the hotspot-dev
mailing list