RFR: 8335294: Fix simple -Wzero-as-null-pointer-constant warnings in gc code

Julian Waters jwaters at openjdk.org
Fri Jun 28 12:40:20 UTC 2024


On Fri, 28 Jun 2024 03:44:53 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> Please review this change that replaces some uses of literal 0 as a null
> pointer constant in gc code to instead use nullptr.
> 
> There is also one place where the use was eliminated entirely, because it was
> dead code following a [[noreturn]] call.
> 
> Testing: mach5 tier1.

I would keep the return nullptr in that one place that it was removed (I'm somewhat certain that leaving out a return in a method that has a non void return type isn't allowed in C++, even if there was a call to a noreturn method directly before the return), but besides that this seems ok

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

Marked as reviewed by jwaters (Committer).

PR Review: https://git.openjdk.org/jdk/pull/19934#pullrequestreview-2147905101


More information about the hotspot-dev mailing list