Integrated: 8336082: Fix -Wzero-as-null-pointer-constant warnings in SimpleCompactHashtable

Kim Barrett kbarrett at openjdk.org
Fri Jul 12 09:35:58 UTC 2024


On Wed, 10 Jul 2024 12:46:06 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> Please review this change to SimpleCompactHashtable to remove some
> -Wzero-as-null-pointer-constant warnings when enabled.
> 
> It has some pointer-typed members that were being initialized with 0, and are
> now initialized with nullptr.
> 
> The constructor was also changed to initialize in the mem-initializer-list
> rather than as assignments in the body.
> 
> In both the constructor and the reset function, the _base_address member was
> added to the initialization/assignment sequence.  It was previously missing,
> so was uninitialized by the constructor and left unchanged by reset.  This
> appears to have been a "harmless" bug; at least, I couldn't find any way to
> use the "unset" value.
> 
> Testing: mach5 tier1

This pull request has now been integrated.

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

8336082: Fix -Wzero-as-null-pointer-constant warnings in SimpleCompactHashtable

Reviewed-by: coleenp, dholmes

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

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


More information about the hotspot-runtime-dev mailing list