Bug 189575 - [Win][Clang] error: type 'float' cannot be narrowed to 'LONG' (aka 'long') in initializer list in WheelEventWin.cpp
Summary: [Win][Clang] error: type 'float' cannot be narrowed to 'LONG' (aka 'long') in...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks: 171618
  Show dependency treegraph
 
Reported: 2018-09-12 22:21 PDT by Fujii Hironori
Modified: 2018-09-13 09:44 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.82 KB, patch)
2018-09-12 22:25 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2018-09-12 22:21:34 PDT
[Win][Clang] error: type 'float' cannot be narrowed to 'LONG' (aka 'long') in initializer list in WheelEventWin.cpp

While doing Bug 171618, the following compilation errors are reported.

> [5/664] Building CXX object Source\WebCore\CMakeFiles\WebCore.dir\platform\win\WheelEventWin.cpp.obj
> FAILED: Source/WebCore/CMakeFiles/WebCore.dir/platform/win/WheelEventWin.cpp.obj 
> C:\tools\llvm\bin\clang-cl.exe (...) -c ..\..\Source\WebCore\platform\win\WheelEventWin.cpp
> ..\..\Source\WebCore\platform\win\WheelEventWin.cpp(86,20):  error: type 'float' cannot be narrowed to 'LONG' (aka 'long') in initializer list [-Wc++11-narrowing]
>     POINT point = {location.x(), location.y()};
>                    ^~~~~~~~~~~~
> ..\..\Source\WebCore\platform\win\WheelEventWin.cpp(86,20):  note: insert an explicit cast to silence this issue
>     POINT point = {location.x(), location.y()};
>                    ^~~~~~~~~~~~
>                    static_cast<LONG>( )
> ..\..\Source\WebCore\platform\win\WheelEventWin.cpp(86,34):  error: type 'float' cannot be narrowed to 'LONG' (aka 'long') in initializer list [-Wc++11-narrowing]
>     POINT point = {location.x(), location.y()};
>                                  ^~~~~~~~~~~~
> ..\..\Source\WebCore\platform\win\WheelEventWin.cpp(86,34):  note: insert an explicit cast to silence this issue
>     POINT point = {location.x(), location.y()};
>                                  ^~~~~~~~~~~~
>                                  static_cast<LONG>( )
> 2 errors generated.
Comment 1 Fujii Hironori 2018-09-12 22:25:17 PDT
Created attachment 349628 [details]
Patch
Comment 2 WebKit Commit Bot 2018-09-13 09:43:53 PDT
Comment on attachment 349628 [details]
Patch

Clearing flags on attachment: 349628

Committed r235975: <https://trac.webkit.org/changeset/235975>
Comment 3 WebKit Commit Bot 2018-09-13 09:43:55 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2018-09-13 09:44:27 PDT
<rdar://problem/44420761>