Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8310537

Fix -Wconversion warnings in gcUtil.hpp

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • 22
    • hotspot
    • gc
    • b04

      There are -Wconversion warnings in gcUtil.hpp/cpp for mostly double to float conversions. The code mostly uses float for AdaptiveWeightedAverage and other statistics but some functions in LinearLeastSquareFit return double.

      Changing some of the returns from the slope() functions and a few float casts turns off -Wconversion warnings:

      2028 src/hotspot/share/gc/shared/gcUtil.hpp
      6 src/hotspot/share/gc/shared/gcUtil.cpp

      The reason for so many is that the file is included several times (ie it's only a small number of warnings).

            coleenp Coleen Phillimore
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: