Integrated: 8336346: Fix -Wzero-as-null-pointer-constant warnings in jvmciJavaClasses.cpp

Kim Barrett kbarrett at openjdk.org
Thu Jul 18 15:27:38 UTC 2024


On Sun, 14 Jul 2024 12:02:47 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> Please review this trivial change to remove -Wzero-as-null-pointer-constant
> warnings (when enabled), triggered by assignment to or comparison with a
> jfieldID (a pointer type) with a value of 0.  Changing the value to nullptr
> removes the warnings.
> 
> Because these changes are in macros that are used many times, this change
> removes about 100 warnings.
> 
> Testing: mach5 tier1

This pull request has now been integrated.

Changeset: 5f7b0072
Author:    Kim Barrett <kbarrett at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/5f7b0072cfe7434b43dea53b2a8d55c56c6668ea
Stats:     2 lines in 1 file changed: 0 ins; 0 del; 2 mod

8336346: Fix -Wzero-as-null-pointer-constant warnings in jvmciJavaClasses.cpp

Reviewed-by: jwaters, thartmann

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

PR: https://git.openjdk.org/jdk/pull/20175


More information about the hotspot-compiler-dev mailing list