Integrated: 8335370: Fix -Wzero-as-null-pointer-constant warning in jvmti_common.hpp

Kim Barrett kbarrett at openjdk.org
Wed Jul 3 02:22:29 UTC 2024


On Sun, 30 Jun 2024 22:15:34 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> Please review this trivial change to the print_method function in
> test/lib/jdk/test/lib/jvmti/jvmti_common.hpp.  It was passing 0 as the FILE*
> argument to fflush, triggering -Wzero-as-null-pointer-constant if that warning
> is enabled.  The change is to replace that 0 with nullptr.
> 
> This removes about 10% of the -Wzero-as-null-pointer-constant warnings when
> building with that option.
> 
> Testing: mach5 tier1

This pull request has now been integrated.

Changeset: f187c92b
Author:    Kim Barrett <kbarrett at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/f187c92befbe63e23b11eb0401e5095c44c24389
Stats:     1 line in 1 file changed: 0 ins; 0 del; 1 mod

8335370: Fix -Wzero-as-null-pointer-constant warning in jvmti_common.hpp

Reviewed-by: jwaters, amenkov, sspitsyn

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

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


More information about the serviceability-dev mailing list