RFR: 8337243: Fix more -Wzero-as-null-pointer-constant warnings in compiler code
Vladimir Kozlov
kvn at openjdk.org
Fri Jul 26 00:47:31 UTC 2024
On Thu, 25 Jul 2024 23:59:54 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 compiler code. Most are changed to use nullptr.
> There are a couple where the better approach is to use a value-initialized
> object of the appropriate template parameter type.
>
> Testing: mach5 tier1
Good. Only one code style suggestion.
src/hotspot/share/code/oopRecorder.cpp line 72:
> 70: if (_arena != nullptr) {
> 71: _handles = new(_arena) GrowableArray<T>(_arena, 10, 0, T{});
> 72: _no_finds = new(_arena) GrowableArray<int>( _arena, 10, 0, 0);
Can you remove spaces before `_arena` here and in following block since you are changing code near.
-------------
Marked as reviewed by kvn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20343#pullrequestreview-2200693245
PR Review Comment: https://git.openjdk.org/jdk/pull/20343#discussion_r1692342815
More information about the hotspot-compiler-dev
mailing list