RFR: 8336080: Fix -Wzero-as-null-pointer-constant warnings in ClassLoaderStats ctor
Kim Barrett
kbarrett at openjdk.org
Wed Jul 10 20:08:56 UTC 2024
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
-------------
Commit messages:
- fix ClassLoaderStats
Changes: https://git.openjdk.org/jdk/pull/20109/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20109&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8336080
Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/20109.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20109/head:pull/20109
PR: https://git.openjdk.org/jdk/pull/20109
More information about the hotspot-runtime-dev
mailing list