[Webkit-unassigned] [Bug 210067] New: [Clang 10] Fix -Wimplicit-int-float-conversion compilation warnings in TestWebKitAPI

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 6 13:19:52 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=210067

            Bug ID: 210067
           Summary: [Clang 10] Fix -Wimplicit-int-float-conversion
                    compilation warnings in TestWebKitAPI
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: Hironori.Fujii at sony.com

[Clang 10] Fix -Wimplicit-int-float-conversion compilation warnings in TestWebKitAPI

This is a sub-task of Bug 204834.

Clang 10 reports compilation warnings in TestWebKitAPI:

> [2108/5311] Building CXX object Tools\TestWebKitAPI\CMakeFiles\TestWTFLib.dir\Tests\WTF\MathExtras.cpp.obj
> ..\..\Tools\TestWebKitAPI\Tests\WTF\MathExtras.cpp(96,20): warning: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Wimplicit-int-float-conversion]
>     float maxInt = std::numeric_limits<int>::max();
>           ~~~~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1 warning generated.

> [3798/5311] Building CXX object Tools\TestWebKitAPI\CMakeFiles\TestWebCoreLib.dir\Tests\WebCore\FloatRect.cpp.obj
> ..\..\Tools\TestWebKitAPI\Tests\WebCore\FloatRect.cpp(773,32): warning: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Wimplicit-int-float-conversion]
>     maxIntRect.shiftMaxXEdgeTo(INT_MAX);
>                ~~~~~~~~~~~~~~~ ^~~~~~~
> C:\PROGRA~1\LLVM\lib\clang\10.0.0\include\limits.h(46,19): note: expanded from macro 'INT_MAX'
> #define INT_MAX   __INT_MAX__
>                   ^~~~~~~~~~~
> <built-in>(81,21): note: expanded from here
> #define __INT_MAX__ 2147483647
>                     ^~~~~~~~~~
> ..\..\Tools\TestWebKitAPI\Tests\WebCore\FloatRect.cpp(774,32): warning: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Wimplicit-int-float-conversion]
>     maxIntRect.shiftMaxYEdgeTo(INT_MAX);
>                ~~~~~~~~~~~~~~~ ^~~~~~~
> C:\PROGRA~1\LLVM\lib\clang\10.0.0\include\limits.h(46,19): note: expanded from macro 'INT_MAX'
> #define INT_MAX   __INT_MAX__
>                   ^~~~~~~~~~~
> <built-in>(81,21): note: expanded from here
> #define __INT_MAX__ 2147483647
>                     ^~~~~~~~~~
> 2 warnings generated.


See also: r259537 (for WTF) and r259588 (for JavaScriptCore)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200406/2a09d884/attachment.htm>


More information about the webkit-unassigned mailing list