WebKit Bugzilla
Attachment 357090 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 for landing
bug-192583-20181212102511.patch (text/plain), 4.76 KB, created by
Fujii Hironori
on 2018-12-11 17:25:12 PST
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2018-12-11 17:25:12 PST
Size:
4.76 KB
patch
obsolete
>Subversion Revision: 239092 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index a2d980a142b730682cc7c080bb8d217b3ad9fef5..cd73df0b2f8a44997c43c3de5a920a13d9bddaa3 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 Alex Christensen. >+ >+ 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-11 Andy Estes <aestes@apple.com> > > Introduce makeBlockPtr for lambdas >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..83e0154b980fa5eb171c810826525934f0b1e967 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..30e4359ce10a174829c4064e7d642dc71f67f1fd 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