WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
189542
[Win][Clang] error: non-constant-expression cannot be narrowed from type 'int' to 'SHORT'
https://bugs.webkit.org/show_bug.cgi?id=189542
Summary
[Win][Clang] error: non-constant-expression cannot be narrowed from type 'int...
Fujii Hironori
Reported
2018-09-12 03:55:36 PDT
[Win][Clang] error: non-constant-expression cannot be narrowed from type 'int' to 'SHORT' While trying to build WebKit WinCairo port with the latest Clang (
Bug 171618
), the following compilation errors are reported.
> [4/664] Building CXX object Source\WebCore\CMakeFiles\WebCore.dir\platform\graphics\win\IntPointWin.cpp.obj > FAILED: Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/win/IntPointWin.cpp.obj > C:\tools\llvm\bin\clang-cl.exe (...) -c ..\..\Source\WebCore\platform\graphics\win\IntPointWin.cpp > ..\..\Source\WebCore\platform\graphics\win\IntPointWin.cpp(56,17): error: non-constant-expression cannot be narrowed from type 'int' to 'SHORT' (aka 'short') in initializer list [-Wc++11-narrowing] > POINTS p = {m_x, m_y}; > ^~~ > ..\..\Source\WebCore\platform\graphics\win\IntPointWin.cpp(56,17): note: insert an explicit cast to silence this issue > POINTS p = {m_x, m_y}; > ^~~ > static_cast<SHORT>( ) > ..\..\Source\WebCore\platform\graphics\win\IntPointWin.cpp(56,22): error: non-constant-expression cannot be narrowed from type 'int' to 'SHORT' (aka 'short') in initializer list [-Wc++11-narrowing] > POINTS p = {m_x, m_y}; > ^~~ > ..\..\Source\WebCore\platform\graphics\win\IntPointWin.cpp(56,22): note: insert an explicit cast to silence this issue > POINTS p = {m_x, m_y}; > ^~~ > static_cast<SHORT>( ) > 2 errors generated.
> [15/31] Building CXX object Source\WebKit\CMakeFiles\WebKit.dir\UIProcess\win\WebInspectorProxyWin.cpp.obj > FAILED: Source/WebKit/CMakeFiles/WebKit.dir/UIProcess/win/WebInspectorProxyWin.cpp.obj > C:\tools\llvm\bin\clang-cl.exe (...) -c ..\..\Source\WebKit\UIProcess\win\WebInspectorProxyWin.cpp > ..\..\Source\WebKit\UIProcess\win\WebInspectorProxyWin.cpp(234,22): error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'LONG' (aka 'long') in initializer list [-Wc++11-narrowing] > RECT r = { 0, 0, initialWindowWidth, initialWindowHeight }; > ^~~~~~~~~~~~~~~~~~ > ..\..\Source\WebKit\UIProcess\win\WebInspectorProxyWin.cpp(234,22): note: insert an explicit cast to silence this issue > RECT r = { 0, 0, initialWindowWidth, initialWindowHeight }; > ^~~~~~~~~~~~~~~~~~ > static_cast<LONG>() > ..\..\Source\WebKit\UIProcess\win\WebInspectorProxyWin.cpp(234,42): error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'LONG' (aka 'long') in initializer list [-Wc++11-narrowing] > RECT r = { 0, 0, initialWindowWidth, initialWindowHeight }; > ^~~~~~~~~~~~~~~~~~~ > ..\..\Source\WebKit\UIProcess\win\WebInspectorProxyWin.cpp(234,42): note: insert an explicit cast to silence this issue > RECT r = { 0, 0, initialWindowWidth, initialWindowHeight }; > ^~~~~~~~~~~~~~~~~~~ > static_cast<LONG>( ) > 2 errors generated.
Attachments
Patch
(2.86 KB, patch)
2018-09-12 04:07 PDT
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2018-09-12 04:07:49 PDT
Created
attachment 349539
[details]
Patch
WebKit Commit Bot
Comment 2
2018-09-12 09:47:28 PDT
Comment on
attachment 349539
[details]
Patch Clearing flags on attachment: 349539 Committed
r235942
: <
https://trac.webkit.org/changeset/235942
>
WebKit Commit Bot
Comment 3
2018-09-12 09:47:29 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 4
2018-09-12 09:49:16 PDT
<
rdar://problem/44386326
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug