RFR: 8338330: Fix -Wzero-as-null-pointer-constant warnings from THROW_XXX_0
Kim Barrett
kbarrett at openjdk.org
Tue Aug 13 22:24:57 UTC 2024
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
-------------
Commit messages:
- add THROW_xxx_NULL
Changes: https://git.openjdk.org/jdk/pull/20574/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20574&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8338330
Stats: 14 lines in 3 files changed: 3 ins; 0 del; 11 mod
Patch: https://git.openjdk.org/jdk/pull/20574.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20574/head:pull/20574
PR: https://git.openjdk.org/jdk/pull/20574
More information about the hotspot-dev
mailing list