Integrated: 8310675: Fix -Wconversion warnings in ZGC code

Joel Sikström duke at openjdk.org
Wed Aug 7 14:18:36 UTC 2024


On Wed, 31 Jul 2024 13:01:50 GMT, Joel Sikström <duke at openjdk.org> wrote:

> Fixed `-Wconversion` warnings in ZGC code, either by adding an explicit type cast, changin the type of the variable or calling an equivalent method with other types. The largest change is the addition of `ZStatDurationSample`, which typecasts `Tickspan::value()` to a `uint64_t` and calls `ZStatSample` to make the code more readable.
> 
> I isolated the `-Wconversion` warnings for ZGC by adding the flag to clangd and displaying the errors in my IDE and going through each file directly associated with ZGC one by one.
> 
> Tested with tiers 1-3.

This pull request has now been integrated.

Changeset: 21f710e7
Author:    Joel Sikström <joel.sikstrom at oracle.com>
Committer: Albert Mingkun Yang <ayang at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/21f710e7f6698b12b06cc3685cefa31f5fcff2a2
Stats:     120 lines in 33 files changed: 5 ins; 0 del; 115 mod

8310675: Fix -Wconversion warnings in ZGC code

Reviewed-by: stefank, ayang

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

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


More information about the hotspot-gc-dev mailing list