RFR: 8313564: Fix -Wconversion warnings in classfile code [v2]

Coleen Phillimore coleenp at openjdk.org
Thu Aug 3 00:16:12 UTC 2023


On Wed, 2 Aug 2023 23:30:36 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> src/hotspot/share/classfile/symbolTable.cpp line 926:
>> 
>>> 924:   if (_symbols_counted > 0) {
>>> 925:     tty->print_cr("  Percent removed          %3.2f",
>>> 926:           ((float)_symbols_removed / (float)_symbols_counted) * 100);
>> 
>> I think you can also just cast once here.
>
> These should probably be double rather than float - the float result will be promoted to double to be passed as an argument anyway.

Changed to double.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15111#discussion_r1282517473


More information about the hotspot-dev mailing list