WebKit Bugzilla
Attachment 357041 Details for
Bug 192583
: [Win][Clang] Fix compilation warnings of WTF
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192583-20181211171844.patch (text/plain), 4.78 KB, created by
Fujii Hironori
on 2018-12-11 00:18:45 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2018-12-11 00:18:45 PST
Size:
4.78 KB
patch
obsolete
>Subversion Revision: 239061 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 4bea040931b7f1cc44ee8cbeb41c2a4119d3285f..39566b4b5357196cfaed61feefefd6cf4c008bc6 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,38 @@ >+2018-12-11 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [Win][Clang] Fix compilation warnings of WTF >+ https://bugs.webkit.org/show_bug.cgi?id=192583 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ clang-cl reports the following warnings. >+ >+ > [92/206] Building CXX object Source\WTF\wtf\CMakeFiles\WTF.dir\StackBounds.cpp.obj >+ > ..\..\Source\WTF\wtf\StackBounds.cpp(163,48): warning: missing field 'AllocationBase' initializer [-Wmissing-field-initializers] >+ > MEMORY_BASIC_INFORMATION stackOrigin = { 0 }; >+ > ^ >+ > 1 warning generated. >+ > [160/206] Building CXX object Source\WTF\wtf\CMakeFiles\WTF.dir\win\RunLoopWin.cpp.obj >+ > ..\..\Source\WTF\wtf\win\RunLoopWin.cpp(34,54): warning: ISO C++11 does not allow conversion from string literal to 'const LPWSTR' (aka 'wchar_t *const') [-Wwritable-strings] >+ > static const LPWSTR kRunLoopMessageWindowClassName = L"RunLoopMessageWindow"; >+ > ^ >+ > ..\..\Source\WTF\wtf\win\RunLoopWin.cpp(86,32): warning: missing field 'lpfnWndProc' initializer [-Wmissing-field-initializers] >+ > WNDCLASS windowClass = { 0 }; >+ > ^ >+ > 2 warnings generated. >+ > [175/206] Building CXX object Source\WTF\wtf\CMakeFiles\WTF.dir\DateMath.cpp.obj >+ > ..\..\Source\WTF\wtf\DateMath.cpp(125,20): warning: unused function 'getLocalTime' [-Wunused-function] >+ > static inline void getLocalTime(const time_t* localTime, struct tm* localTM) >+ > ^ >+ > 1 warning generated. >+ >+ * wtf/DateMath.cpp: >+ (WTF::getLocalTime): Defined only if used. >+ * wtf/StackBounds.cpp: >+ (WTF::StackBounds::currentThreadStackBoundsInternal): Initialize stackOrigin with '{ }'. >+ * wtf/win/RunLoopWin.cpp: Change the type of kRunLoopMessageWindowClassName to LPCWSTR. >+ (WTF::RunLoop::registerRunLoopMessageWindowClass): Initialize windowClass with '{ }'. >+ > 2018-12-10 Alexey Proskuryakov <ap@apple.com> > > Move ENABLE_SEC_ITEM_SHIM out of WebKit's config.h >diff --git a/Source/WTF/wtf/DateMath.cpp b/Source/WTF/wtf/DateMath.cpp >index ff0b45718dd40fe2ef57519ebc284ee0205697bf..8b8eed257d3d7c6d97bbc67ca6fcfc2890761ea3 100644 >--- a/Source/WTF/wtf/DateMath.cpp >+++ b/Source/WTF/wtf/DateMath.cpp >@@ -122,16 +122,16 @@ static const int firstDayOfMonth[2][12] = { > {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335} > }; > >+#if !OS(WINDOWS) || HAVE(TM_GMTOFF) > static inline void getLocalTime(const time_t* localTime, struct tm* localTM) > { >-#if COMPILER(MSVC) >- localtime_s(localTM, localTime); >-#elif HAVE(LOCALTIME_R) >+#if HAVE(LOCALTIME_R) > localtime_r(localTime, localTM); > #else > localtime_s(localTime, localTM); > #endif > } >+#endif > > bool isLeapYear(int year) > { >diff --git a/Source/WTF/wtf/StackBounds.cpp b/Source/WTF/wtf/StackBounds.cpp >index a429f446fc76a7e8144ec14d9db693852541e0df..208a8e2fadfcfc0b087c8d07581120ba9493853b 100644 >--- a/Source/WTF/wtf/StackBounds.cpp >+++ b/Source/WTF/wtf/StackBounds.cpp >@@ -160,7 +160,7 @@ StackBounds StackBounds::currentThreadStackBoundsInternal() > StackBounds StackBounds::currentThreadStackBoundsInternal() > { > ASSERT(stackDirection() == StackDirection::Downward); >- MEMORY_BASIC_INFORMATION stackOrigin = { 0 }; >+ MEMORY_BASIC_INFORMATION stackOrigin = { }; > VirtualQuery(&stackOrigin, &stackOrigin, sizeof(stackOrigin)); > // stackOrigin.AllocationBase points to the reserved stack memory base address. > >diff --git a/Source/WTF/wtf/win/RunLoopWin.cpp b/Source/WTF/wtf/win/RunLoopWin.cpp >index 5691385b077a60efc2fae75efbdb30d7bd910884..ff56297483bbbc1d583912f884f23342b126ac98 100644 >--- a/Source/WTF/wtf/win/RunLoopWin.cpp >+++ b/Source/WTF/wtf/win/RunLoopWin.cpp >@@ -31,7 +31,7 @@ > namespace WTF { > > static const UINT PerformWorkMessage = WM_USER + 1; >-static const LPWSTR kRunLoopMessageWindowClassName = L"RunLoopMessageWindow"; >+static const LPCWSTR kRunLoopMessageWindowClassName = L"RunLoopMessageWindow"; > > LRESULT CALLBACK RunLoop::RunLoopWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) > { >@@ -83,7 +83,7 @@ bool RunLoop::registerRunLoopMessageWindowClass() > { > // FIXME: This really only needs to be called once. > >- WNDCLASS windowClass = { 0 }; >+ WNDCLASS windowClass = { }; > windowClass.lpfnWndProc = RunLoop::RunLoopWndProc; > windowClass.cbWndExtra = sizeof(RunLoop*); > windowClass.lpszClassName = kRunLoopMessageWindowClassName;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192583
:
357041
|
357090