RFR: 8337416: Fix -Wzero-as-null-pointer-constant warnings in misc. runtime code
David Holmes
dholmes at openjdk.org
Tue Jul 30 04:34:31 UTC 2024
On Tue, 30 Jul 2024 03:34:18 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this (perhaps trivial?) change that removes some uses of literal
> 0 as a null pointer constant in misc. runtime code. Most are changed to use
> nullptr.
>
> Testing: mach5 tier1
This looks fine, and I think trivial.
I think there is an existing bug but probably better to file a separate JBS issue for that.
Thanks
src/hotspot/share/oops/constantPool.cpp line 2068:
> 2066: }
> 2067: printf("Cpool size: %d\n", size);
> 2068: fflush(nullptr);
This looks like a bug. I think someone used 0 aka fd0 when they needed stdout for fflush.
-------------
Marked as reviewed by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20383#pullrequestreview-2206608763
PR Review Comment: https://git.openjdk.org/jdk/pull/20383#discussion_r1696275148
More information about the hotspot-dev
mailing list