Bug 189575

Summary: [Win][Clang] error: type 'float' cannot be narrowed to 'LONG' (aka 'long') in initializer list in WheelEventWin.cpp
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: WebCore Misc.Assignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, commit-queue, pvollan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 171618    
Attachments:
Description Flags
Patch none

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>