Integrated: 8336080: Fix -Wzero-as-null-pointer-constant warnings in ClassLoaderStats ctor

Flauber flauberjp at gmail.com
Tue Jul 16 18:12:48 UTC 2024


how to unsubscribe? Please help!

On Tue, Jul 16, 2024 at 2:56 PM Kim Barrett <kbarrett at openjdk.org> wrote:

> On Wed, 10 Jul 2024 12:15:23 GMT, Kim Barrett <kbarrett at openjdk.org>
> wrote:
>
> > Please review this change to member initializers in the ClassLoaderStats
> > constructor.
> >
> > The initial value for members of pointer type are changed from 0 to
> nullptr.
> >
> > The initializers for members of oop type are changed from a value of 0 to
> > using value initialization. In debug builds this calls the provided
> default
> > ctor for the (debug-only) oop class, which initialized the underlying
> value to
> > nullptr. In release builds (where oop is a type alias for oopDesc*) this
> is a
> > zero initialization of the pointer-typed member, but without triggering
> > -Wzero-as-null-pointer-constant warnings.
> >
> > Testing: mach5 tier1
>
> This pull request has now been integrated.
>
> Changeset: 59bf3d77
> Author:    Kim Barrett <kbarrett at openjdk.org>
> URL:
> https://git.openjdk.org/jdk/commit/59bf3d77aa96dfdc199f5a6893c76c8a379e9fba
> Stats:     4 lines in 1 file changed: 0 ins; 0 del; 4 mod
>
> 8336080: Fix -Wzero-as-null-pointer-constant warnings in ClassLoaderStats
> ctor
>
> Reviewed-by: dholmes, iwalulya
>
> -------------
>
> PR: https://git.openjdk.org/jdk/pull/20109
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-runtime-dev/attachments/20240716/4f854b82/attachment.htm>


More information about the hotspot-runtime-dev mailing list