WebKit Bugzilla
Attachment 357042 Details for
Bug 192584
: [Win][Clang] Fix warning -Wmissing-field-initializers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192584-20181211180913.patch (text/plain), 28.42 KB, created by
Fujii Hironori
on 2018-12-11 01:09:20 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2018-12-11 01:09:20 PST
Size:
28.42 KB
patch
obsolete
>Subversion Revision: 239061 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 477c69df84175ebba3059b89a92aec96ae63eee2..b38aab799dc42f67e6eb56e6e86206f5653a3fa8 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,42 @@ >+2018-12-11 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [Win][Clang] Fix warning -Wmissing-field-initializers >+ https://bugs.webkit.org/show_bug.cgi?id=192584 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Initialize a struct with '{ }' instead of '{0}'. >+ >+ No new tests, no behavior changes. >+ >+ * platform/graphics/win/FontCacheWin.cpp: >+ (WebCore::FontCache::lastResortFallbackFont): >+ * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp: >+ (WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): >+ * platform/win/ClipboardUtilitiesWin.cpp: >+ (WebCore::setFileDescriptorData): >+ (WebCore::setFileContentData): >+ (WebCore::setUCharData): >+ (WebCore::setUtf8Data): >+ (WebCore::setCFData): >+ * platform/win/CursorWin.cpp: >+ (WebCore::createSharedCursor): >+ * platform/win/DefWndProcWindowClass.cpp: >+ (WebCore::registerClass): >+ * platform/win/DragImageWin.cpp: >+ (WebCore::createDragImageIconForCachedImageFilename): >+ * platform/win/PasteboardWin.cpp: >+ (WebCore::writeURL): >+ (WebCore::Pasteboard::writeString): >+ (WebCore::Pasteboard::writeRangeToDataObject): >+ (WebCore::Pasteboard::writePlainTextToDataObject): >+ (WebCore::writeFileToDataObject): >+ (WebCore::Pasteboard::writeMarkup): >+ * platform/win/PopupMenuWin.cpp: >+ (WebCore::PopupMenuWin::show): >+ * platform/win/SSLKeyGeneratorWin.cpp: >+ (WebCore::WebCore::signedPublicKeyAndChallengeString): >+ > 2018-12-10 Antti Koivisto <antti@apple.com> > > Rename "forced style recalc" to "full style rebuild" >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 0dc71457dc022e32dfe19ca268c180b8e20aafd3..145ac4aa4e77f8f23202b6e70a13df3a09ba3f82 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,20 @@ >+2018-12-11 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [Win][Clang] Fix warning -Wmissing-field-initializers >+ https://bugs.webkit.org/show_bug.cgi?id=192584 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Initialize a struct with '{ }' instead of '{0}'. >+ >+ * UIProcess/Launcher/win/ProcessLauncherWin.cpp: >+ (WebKit::ProcessLauncher::launchProcess): >+ * UIProcess/win/WebPopupMenuProxyWin.cpp: >+ (WebKit::WebPopupMenuProxyWin::showPopupMenu): >+ * UIProcess/win/WebView.cpp: >+ (WebKit::WebView::initializeToolTipWindow): >+ (WebKit::WebView::setToolTip): >+ > 2018-12-10 Tim Horton <timothy_horton@apple.com> > > Animated scrolling on Google Maps scrolls the page in addition to moving the map >diff --git a/Source/WebKitLegacy/win/ChangeLog b/Source/WebKitLegacy/win/ChangeLog >index f013f52d27b7c00ae8f77e7e3473cc31f79f27d3..36ed4dd8717aba842b0f027d9eb6a7bc98f4d704 100644 >--- a/Source/WebKitLegacy/win/ChangeLog >+++ b/Source/WebKitLegacy/win/ChangeLog >@@ -1,3 +1,22 @@ >+2018-12-11 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [Win][Clang] Fix warning -Wmissing-field-initializers >+ https://bugs.webkit.org/show_bug.cgi?id=192584 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Initialize a struct with '{ }' instead of '{0}'. >+ >+ * WebKitMessageLoop.cpp: >+ (WebKitMessageLoop::run): >+ * WebView.cpp: >+ (WebView::onMenuCommand): >+ (WebView::gesture): >+ (WebView::setShouldInvertColors): >+ (WebView::initializeToolTipWindow): >+ (WebView::setToolTip): >+ (WebView::fullScreenClientForceRepaint): >+ > 2018-12-05 Wenson Hsieh <wenson_hsieh@apple.com> > > Turn WritingDirection into an enum class >diff --git a/Source/WebCore/platform/graphics/win/FontCacheWin.cpp b/Source/WebCore/platform/graphics/win/FontCacheWin.cpp >index 796287698173ab443c4478ea495b8af691323caa..7367bde473f2786c67ef528870f4f7db8e6eec18 100644 >--- a/Source/WebCore/platform/graphics/win/FontCacheWin.cpp >+++ b/Source/WebCore/platform/graphics/win/FontCacheWin.cpp >@@ -374,7 +374,7 @@ Ref<Font> FontCache::lastResortFallbackFont(const FontDescription& fontDescripti > } > > // Fall back to Non-client metrics fonts. >- NONCLIENTMETRICS nonClientMetrics = {0}; >+ NONCLIENTMETRICS nonClientMetrics = { }; > nonClientMetrics.cbSize = sizeof(nonClientMetrics); > if (SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(nonClientMetrics), &nonClientMetrics, 0)) { > if (simpleFont = fontFromDescriptionAndLogFont(fontDescription, nonClientMetrics.lfMessageFont, fallbackFontName)) >diff --git a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp >index 16b6b5dff8005c4fa4b8722385d29733484b2cd2..362d5004a54f61d864ec6eeaf939832b029b8b5a 100644 >--- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp >+++ b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp >@@ -61,7 +61,7 @@ void MediaPlayerPrivateFullscreenWindow::createWindow(HWND parentHwnd) > static ATOM windowAtom; > static LPCWSTR windowClassName = L"MediaPlayerPrivateFullscreenWindowClass"; > if (!windowAtom) { >- WNDCLASSEX wcex = {0}; >+ WNDCLASSEX wcex = { }; > wcex.cbSize = sizeof(wcex); > wcex.style = CS_HREDRAW | CS_VREDRAW; > wcex.lpfnWndProc = staticWndProc; >@@ -72,7 +72,7 @@ void MediaPlayerPrivateFullscreenWindow::createWindow(HWND parentHwnd) > > ASSERT(!m_hwnd); > >- MONITORINFO mi = {0}; >+ MONITORINFO mi = { }; > mi.cbSize = sizeof(MONITORINFO); > if (!GetMonitorInfo(MonitorFromWindow(parentHwnd, MONITOR_DEFAULTTONEAREST), &mi)) > return; >diff --git a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp b/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp >index 790a82f8b671100a162e53ed89797cd9078efff5..2f033fab21291004ca5720834e020b24657905a8 100644 >--- a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp >+++ b/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp >@@ -424,7 +424,7 @@ void setFileDescriptorData(IDataObject* dataObject, int size, const String& pass > { > String pathname = passedPathname; > >- STGMEDIUM medium = { 0 }; >+ STGMEDIUM medium = { }; > medium.tymed = TYMED_HGLOBAL; > > medium.hGlobal = ::GlobalAlloc(GPTR, sizeof(FILEGROUPDESCRIPTOR)); >@@ -446,7 +446,7 @@ void setFileDescriptorData(IDataObject* dataObject, int size, const String& pass > > void setFileContentData(IDataObject* dataObject, int size, void* dataBlob) > { >- STGMEDIUM medium = { 0 }; >+ STGMEDIUM medium = { }; > medium.tymed = TYMED_HGLOBAL; > > medium.hGlobal = ::GlobalAlloc(GPTR, size); >@@ -754,7 +754,7 @@ void getCFData(IDataObject* data, FORMATETC* format, Vector<String>& dataStrings > > void setUCharData(IDataObject* data, FORMATETC* format, const Vector<String>& dataStrings) > { >- STGMEDIUM medium = {0}; >+ STGMEDIUM medium = { }; > medium.tymed = TYMED_HGLOBAL; > > medium.hGlobal = createGlobalData(dataStrings.first()); >@@ -766,7 +766,7 @@ void setUCharData(IDataObject* data, FORMATETC* format, const Vector<String>& da > > void setUtf8Data(IDataObject* data, FORMATETC* format, const Vector<String>& dataStrings) > { >- STGMEDIUM medium = {0}; >+ STGMEDIUM medium = { }; > medium.tymed = TYMED_HGLOBAL; > > CString charString = dataStrings.first().utf8(); >@@ -785,7 +785,7 @@ void setUtf8Data(IDataObject* data, FORMATETC* format, const Vector<String>& dat > #if USE(CF) > void setCFData(IDataObject* data, FORMATETC* format, const Vector<String>& dataStrings) > { >- STGMEDIUM medium = {0}; >+ STGMEDIUM medium = { }; > medium.tymed = TYMED_HGLOBAL; > > SIZE_T dropFilesSize = sizeof(DROPFILES) + (sizeof(WCHAR) * (dataStrings.first().length() + 2)); >diff --git a/Source/WebCore/platform/win/CursorWin.cpp b/Source/WebCore/platform/win/CursorWin.cpp >index b4ffbc5cf78909e0f3e33ff4f21c090853e47e8a..e659bae056835f2907a84bfeaf219bcbdde46cc9 100644 >--- a/Source/WebCore/platform/win/CursorWin.cpp >+++ b/Source/WebCore/platform/win/CursorWin.cpp >@@ -111,7 +111,7 @@ static Ref<SharedCursor> createSharedCursor(Image* img, const IntPoint& hotSpot) > SelectObject(andMaskDC.get(), oldAndMask); > SelectObject(xorMaskDC.get(), oldXorMask); > >- ICONINFO icon = {0}; >+ ICONINFO icon = { }; > icon.fIcon = FALSE; > icon.xHotspot = effectiveHotSpot.x(); > icon.yHotspot = effectiveHotSpot.y(); >diff --git a/Source/WebCore/platform/win/DefWndProcWindowClass.cpp b/Source/WebCore/platform/win/DefWndProcWindowClass.cpp >index b07a6dee35ade99420e8244f943a86947a503ed4..df1f3678de5d0d1b2a68374272e4108bdad3a153 100644 >--- a/Source/WebCore/platform/win/DefWndProcWindowClass.cpp >+++ b/Source/WebCore/platform/win/DefWndProcWindowClass.cpp >@@ -35,7 +35,7 @@ static const wchar_t className[] = L"DefWndProcWindowClass"; > > static ATOM registerClass() > { >- WNDCLASSW wndClass = {0}; >+ WNDCLASSW wndClass = { }; > wndClass.lpszClassName = className; > wndClass.lpfnWndProc = ::DefWindowProcW; > wndClass.hInstance = instanceHandle(); >diff --git a/Source/WebCore/platform/win/DragImageWin.cpp b/Source/WebCore/platform/win/DragImageWin.cpp >index a6b672fc727fe8379a2d0f7e0460716960cfbb87..2e2f94ca0d58beeb793660b1dcfe41b98b940d01 100644 >--- a/Source/WebCore/platform/win/DragImageWin.cpp >+++ b/Source/WebCore/platform/win/DragImageWin.cpp >@@ -73,7 +73,7 @@ DragImageRef dissolveDragImageToFraction(DragImageRef image, float) > > DragImageRef createDragImageIconForCachedImageFilename(const String& filename) > { >- SHFILEINFO shfi = {0}; >+ SHFILEINFO shfi = { }; > String fname = filename; > if (FAILED(SHGetFileInfo(stringToNullTerminatedWChar(fname).data(), FILE_ATTRIBUTE_NORMAL, &shfi, sizeof(shfi), SHGFI_ICON | SHGFI_USEFILEATTRIBUTES))) > return 0; >diff --git a/Source/WebCore/platform/win/PasteboardWin.cpp b/Source/WebCore/platform/win/PasteboardWin.cpp >index d5967a5820c97ae28c625a50d8038e00ee25dd2a..696c8728969d0215737ecd488315581a9885df79 100644 >--- a/Source/WebCore/platform/win/PasteboardWin.cpp >+++ b/Source/WebCore/platform/win/PasteboardWin.cpp >@@ -373,7 +373,7 @@ static bool writeURL(WCDataObject *data, const URL& url, String title, bool with > title = url.host().toString(); > } > >- STGMEDIUM medium = {0}; >+ STGMEDIUM medium = { }; > medium.tymed = TYMED_HGLOBAL; > > medium.hGlobal = createGlobalData(url, title); >@@ -417,7 +417,7 @@ void Pasteboard::writeString(const String& type, const String& data) > } > > if (winType == ClipboardDataTypeText) { >- STGMEDIUM medium = {0}; >+ STGMEDIUM medium = { }; > medium.tymed = TYMED_HGLOBAL; > medium.hGlobal = createGlobalData(data); > if (!medium.hGlobal) >@@ -440,7 +440,7 @@ void Pasteboard::writeRangeToDataObject(Range& selectedRange, Frame& frame) > if (!m_writableDataObject) > return; > >- STGMEDIUM medium = {0}; >+ STGMEDIUM medium = { }; > medium.tymed = TYMED_HGLOBAL; > > Vector<char> data; >@@ -505,7 +505,7 @@ void Pasteboard::writePlainTextToDataObject(const String& text, SmartReplaceOpti > if (!m_writableDataObject) > return; > >- STGMEDIUM medium = {0}; >+ STGMEDIUM medium = { }; > medium.tymed = TYMED_HGLOBAL; > > String str = text; >@@ -606,7 +606,7 @@ static HRESULT writeFileToDataObject(IDataObject* dataObject, HGLOBAL fileDescri > { > HRESULT hr = S_OK; > FORMATETC* fe; >- STGMEDIUM medium = {0}; >+ STGMEDIUM medium = { }; > medium.tymed = TYMED_HGLOBAL; > > if (!fileDescriptor || !fileContent) >@@ -1063,7 +1063,7 @@ void Pasteboard::writeMarkup(const String& markup) > Vector<char> data; > markupToCFHTML(markup, "", data); > >- STGMEDIUM medium = {0}; >+ STGMEDIUM medium = { }; > medium.tymed = TYMED_HGLOBAL; > > medium.hGlobal = createGlobalData(data); >diff --git a/Source/WebCore/platform/win/PopupMenuWin.cpp b/Source/WebCore/platform/win/PopupMenuWin.cpp >index 1bb17457c490121c4de1d911549761bc3d71635d..d4cb86f99a1fb059be7ac2e58fe6b1eb141d29a2 100644 >--- a/Source/WebCore/platform/win/PopupMenuWin.cpp >+++ b/Source/WebCore/platform/win/PopupMenuWin.cpp >@@ -161,7 +161,7 @@ void PopupMenuWin::show(const IntRect& r, FrameView* view, int index) > shouldAnimate = FALSE; > > if (shouldAnimate) { >- RECT viewRect = {0}; >+ RECT viewRect = { }; > ::GetWindowRect(hostWindow, &viewRect); > if (!::IsRectEmpty(&viewRect)) > ::AnimateWindow(m_popup, defaultAnimationDuration, AW_BLEND); >diff --git a/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp b/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp >index de20b8d09ac50b172e5d37b6066e17b4674af886..af65c36069f21a5f511ed230fafc7a3f0da0ee28 100644 >--- a/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp >+++ b/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp >@@ -60,7 +60,7 @@ String WebCore::signedPublicKeyAndChallengeString(unsigned index, const String& > if (!CryptExportPublicKeyInfo(hContext, AT_KEYEXCHANGE, X509_ASN_ENCODING, pPubInfo, &dwPubInfoLength)) > break; > >- CERT_KEYGEN_REQUEST_INFO requestInfo = { 0 }; >+ CERT_KEYGEN_REQUEST_INFO requestInfo = { }; > requestInfo.dwVersion = CERT_KEYGEN_REQUEST_V1; > requestInfo.pwszChallengeString = L""; > requestInfo.SubjectPublicKeyInfo = *pPubInfo; >@@ -71,7 +71,7 @@ String WebCore::signedPublicKeyAndChallengeString(unsigned index, const String& > auto localChallengeWide = stringToNullTerminatedWChar(localChallenge); > requestInfo.pwszChallengeString = const_cast<wchar_t*>(localChallengeWide.data()); > >- CRYPT_ALGORITHM_IDENTIFIER signAlgo = { 0 }; >+ CRYPT_ALGORITHM_IDENTIFIER signAlgo = { }; > signAlgo.pszObjId = szOID_RSA_SHA1RSA; > > DWORD dwEncodedLength; >diff --git a/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp b/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp >index 8fdf717777f0a86272780a4e8d2c9519666ce608..bf59517373dec6aeec9e1791615c375ff3020714 100644 >--- a/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp >+++ b/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp >@@ -87,11 +87,11 @@ void ProcessLauncher::launchProcess() > > auto commandLine = stringToNullTerminatedWChar(commandLineBuilder.toString()); > >- STARTUPINFO startupInfo = { 0 }; >+ STARTUPINFO startupInfo = { }; > startupInfo.cb = sizeof(startupInfo); > startupInfo.dwFlags = STARTF_USESHOWWINDOW; > startupInfo.wShowWindow = SW_HIDE; >- PROCESS_INFORMATION processInformation = { 0 }; >+ PROCESS_INFORMATION processInformation = { }; > BOOL result = ::CreateProcess(0, commandLine.data(), 0, 0, true, 0, 0, 0, &startupInfo, &processInformation); > > // We can now close the client identifier handle. >diff --git a/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp b/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp >index 2243dfde62c0a84355ada9a60e3628c79cc8f70e..f2ff47ea11bf90bfaf10b4de8aa01476b1097c05 100644 >--- a/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp >+++ b/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp >@@ -218,7 +218,7 @@ void WebPopupMenuProxyWin::showPopupMenu(const IntRect& rect, TextDirection, dou > shouldAnimate = FALSE; > > if (shouldAnimate) { >- RECT viewRect = {0}; >+ RECT viewRect = { }; > ::GetWindowRect(hostWindow, &viewRect); > > if (!::IsRectEmpty(&viewRect)) { >diff --git a/Source/WebKit/UIProcess/win/WebView.cpp b/Source/WebKit/UIProcess/win/WebView.cpp >index ed1d4ec32217926c6b6c929ae0bfc140332616d3..4de67d5cfbf8911267ed21939b10fe9c95219904 100644 >--- a/Source/WebKit/UIProcess/win/WebView.cpp >+++ b/Source/WebKit/UIProcess/win/WebView.cpp >@@ -653,7 +653,7 @@ void WebView::initializeToolTipWindow() > if (!m_toolTipWindow) > return; > >- TOOLINFO info = { 0 }; >+ TOOLINFO info = { }; > info.cbSize = sizeof(info); > info.uFlags = TTF_IDISHWND | TTF_SUBCLASS; > info.uId = reinterpret_cast<UINT_PTR>(m_window); >@@ -871,7 +871,7 @@ void WebView::setToolTip(const String& toolTip) > return; > > if (!toolTip.isEmpty()) { >- TOOLINFO info = { 0 }; >+ TOOLINFO info = { }; > info.cbSize = sizeof(info); > info.uFlags = TTF_IDISHWND; > info.uId = reinterpret_cast<UINT_PTR>(nativeWindow()); >diff --git a/Source/WebKitLegacy/win/WebKitMessageLoop.cpp b/Source/WebKitLegacy/win/WebKitMessageLoop.cpp >index f76a66cd42801745009ac397e9702b2dd39086ea..da9918de5ba2fa23120d5ca302b60bd6c695fce6 100644 >--- a/Source/WebKitLegacy/win/WebKitMessageLoop.cpp >+++ b/Source/WebKitLegacy/win/WebKitMessageLoop.cpp >@@ -84,7 +84,7 @@ ULONG WebKitMessageLoop::Release() > > HRESULT WebKitMessageLoop::run(_In_ HACCEL hAccelTable) > { >- MSG msg = { 0 }; >+ MSG msg = { }; > > while (GetMessage(&msg, 0, 0, 0)) { > performMessageLoopTasks(); >diff --git a/Source/WebKitLegacy/win/WebView.cpp b/Source/WebKitLegacy/win/WebView.cpp >index e4b2e5f5c57503d25edf27b1bf79eaa9da404a16..5b55325d45541518a12f5a0e3d1585db8a9c2efe 100644 >--- a/Source/WebKitLegacy/win/WebView.cpp >+++ b/Source/WebKitLegacy/win/WebView.cpp >@@ -1785,7 +1785,7 @@ void WebView::onMenuCommand(WPARAM wParam, LPARAM lParam) > HMENU hMenu = reinterpret_cast<HMENU>(lParam); > unsigned index = static_cast<unsigned>(wParam); > >- MENUITEMINFO menuItemInfo = { 0 }; >+ MENUITEMINFO menuItemInfo = { }; > menuItemInfo.cbSize = sizeof(menuItemInfo); > menuItemInfo.fMask = MIIM_STRING; > ::GetMenuItemInfo(hMenu, index, true, &menuItemInfo); >@@ -1997,7 +1997,7 @@ bool WebView::gesture(WPARAM wParam, LPARAM lParam) > > HGESTUREINFO gestureHandle = reinterpret_cast<HGESTUREINFO>(lParam); > >- GESTUREINFO gi = {0}; >+ GESTUREINFO gi = { }; > gi.cbSize = sizeof(GESTUREINFO); > > if (!GetGestureInfoPtr()(gestureHandle, reinterpret_cast<PGESTUREINFO>(&gi))) >@@ -2484,7 +2484,7 @@ void WebView::setShouldInvertColors(bool shouldInvertColors) > m_layerTreeHost->setShouldInvertColors(shouldInvertColors); > #endif > >- RECT windowRect = {0}; >+ RECT windowRect = { }; > frameRect(&windowRect); > > // repaint expects logical pixels, so rescale here. >@@ -3191,7 +3191,7 @@ void WebView::initializeToolTipWindow() > if (!m_toolTipHwnd) > return; > >- TOOLINFO info = {0}; >+ TOOLINFO info = { }; > info.cbSize = sizeof(info); > info.uFlags = TTF_IDISHWND | TTF_SUBCLASS ; > info.uId = reinterpret_cast<UINT_PTR>(m_viewWindow); >@@ -3213,7 +3213,7 @@ void WebView::setToolTip(const String& toolTip) > m_toolTip = toolTip; > > if (!m_toolTip.isEmpty()) { >- TOOLINFO info = {0}; >+ TOOLINFO info = { }; > info.cbSize = sizeof(info); > info.uFlags = TTF_IDISHWND; > info.uId = reinterpret_cast<UINT_PTR>(m_viewWindow); >@@ -7576,7 +7576,7 @@ void WebView::fullScreenClientDidExitFullScreen() > void WebView::fullScreenClientForceRepaint() > { > ASSERT(m_fullscreenController); >- RECT windowRect = {0}; >+ RECT windowRect = { }; > frameRect(&windowRect); > repaint(windowRect, true /*contentChanged*/, true /*immediate*/, false /*contentOnly*/); > m_fullscreenController->repaintCompleted(); >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index c3ecd73e1c8c91b60992950203416e02ff03712c..4263ae6dcf70e1f024a922c17409a755735b898f 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,34 @@ >+2018-12-11 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [Win][Clang] Fix warning -Wmissing-field-initializers >+ https://bugs.webkit.org/show_bug.cgi?id=192584 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Initialize a struct with '{ }' instead of '{0}'. >+ >+ * DumpRenderTree/win/DumpRenderTree.cpp: >+ (runTest): >+ * DumpRenderTree/win/EventSender.cpp: >+ (makeMsg): >+ (replaySavedEvents): >+ (beginDragWithFilesCallback): >+ * DumpRenderTree/win/PixelDumpSupportWin.cpp: >+ (createBitmapContextFromWebView): >+ * MiniBrowser/win/WebKitLegacyBrowserWindow.cpp: >+ (updateMenuItemForHistoryItem): >+ * MiniBrowser/win/WinMain.cpp: >+ (wWinMain): >+ * TestWebKitAPI/win/HostWindow.cpp: >+ (TestWebKitAPI::HostWindow::clientRect const): >+ (TestWebKitAPI::HostWindow::registerWindowClass): >+ * TestWebKitAPI/win/PlatformWebViewWin.cpp: >+ (TestWebKitAPI::PlatformWebView::registerWindowClass): >+ * WebKitTestRunner/win/PlatformWebViewWin.cpp: >+ (WTR::registerWindowClass): >+ (WTR::PlatformWebView::windowFrame): >+ (WTR::PlatformWebView::windowSnapshotImage): >+ > 2018-12-10 Don Olmstead <don.olmstead@sony.com> > > [CMake] Add ENABLE_RESOURCE_LOAD_STATISTICS to WebKitFeatures.cmake >diff --git a/Tools/DumpRenderTree/win/DumpRenderTree.cpp b/Tools/DumpRenderTree/win/DumpRenderTree.cpp >index 9f91a2cba3701abfab0b86e6dbb71ff33497fb94..1b89257fa38cd335f02b80723802fb1a63de5f51 100644 >--- a/Tools/DumpRenderTree/win/DumpRenderTree.cpp >+++ b/Tools/DumpRenderTree/win/DumpRenderTree.cpp >@@ -1231,7 +1231,7 @@ static void runTest(const string& inputLine) > workQueue.clear(); > workQueue.setFrozen(false); > >- MSG msg = { 0 }; >+ MSG msg = { }; > HWND hostWindow; > webView->hostWindow(&hostWindow); > >diff --git a/Tools/DumpRenderTree/win/EventSender.cpp b/Tools/DumpRenderTree/win/EventSender.cpp >index c9080075dc78c56643c12ff9cc7980499a0015e3..7cdf010cdb3b2543848e82d502e529bdab1e0e14 100644 >--- a/Tools/DumpRenderTree/win/EventSender.cpp >+++ b/Tools/DumpRenderTree/win/EventSender.cpp >@@ -120,7 +120,7 @@ static DWORD currentEventTime() > > static MSG makeMsg(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) > { >- MSG result = {0}; >+ MSG result = { }; > result.hwnd = hwnd; > result.message = message; > result.wParam = wParam; >@@ -362,7 +362,7 @@ void replaySavedEvents(HRESULT* oleDragAndDropReturnValue) > { > replayingSavedEvents = true; > >- MSG msg = { 0 }; >+ MSG msg = { }; > > while (startOfQueue < endOfQueue && !msgQueue[startOfQueue].delay) { > msg = msgQueue[startOfQueue++].msg; >@@ -696,7 +696,7 @@ static JSValueRef beginDragWithFilesCallback(JSContextRef context, JSObjectRef f > // We should append "0" in the end of |files| so that |DragQueryFileW| retrieved the number of files correctly from Ole Clipboard. > files.append(0); > >- STGMEDIUM hDropMedium = {0}; >+ STGMEDIUM hDropMedium = { }; > hDropMedium.tymed = TYMED_HGLOBAL; > SIZE_T dropFilesSize = sizeof(DROPFILES) + (sizeof(WCHAR) * files.size()); > hDropMedium.hGlobal = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, dropFilesSize); >@@ -713,7 +713,7 @@ static JSValueRef beginDragWithFilesCallback(JSContextRef context, JSObjectRef f > data[i] = files[i]; > GlobalUnlock(hDropMedium.hGlobal); > >- STGMEDIUM hFileNameMedium = {0}; >+ STGMEDIUM hFileNameMedium = { }; > hFileNameMedium.tymed = TYMED_HGLOBAL; > SIZE_T hFileNameSize = sizeof(WCHAR) * files.size(); > hFileNameMedium.hGlobal = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, hFileNameSize); >@@ -925,7 +925,7 @@ static JSClassRef getClass(JSContextRef context) > static JSClassRef eventSenderClass = 0; > > if (!eventSenderClass) { >- JSClassDefinition classDefinition = {0}; >+ JSClassDefinition classDefinition = { }; > classDefinition.staticFunctions = staticFunctions; > classDefinition.staticValues = staticValues; > >diff --git a/Tools/DumpRenderTree/win/PixelDumpSupportWin.cpp b/Tools/DumpRenderTree/win/PixelDumpSupportWin.cpp >index 4495b74674af407276a5681d3eac9fb76eeaae79..9207402a5a414a3908e7981f70121c196e28e57b 100644 >--- a/Tools/DumpRenderTree/win/PixelDumpSupportWin.cpp >+++ b/Tools/DumpRenderTree/win/PixelDumpSupportWin.cpp >@@ -62,7 +62,7 @@ RefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool increme > if (!GetWindowRect(webViewWindow, &frame)) > return nullptr; > >- BITMAPINFO bmp = {0}; >+ BITMAPINFO bmp = { }; > bmp.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); > bmp.bmiHeader.biWidth = frame.right - frame.left; > bmp.bmiHeader.biHeight = -(frame.bottom - frame.top); >@@ -79,7 +79,7 @@ RefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool increme > ::SelectObject(memoryDC.get(), bitmap); > SendMessage(webViewWindow, WM_PRINT, reinterpret_cast<WPARAM>(memoryDC.get()), PRF_CLIENT | PRF_CHILDREN | PRF_OWNED); > >- BITMAP info = {0}; >+ BITMAP info = { }; > GetObject(bitmap, sizeof(info), &info); > ASSERT(info.bmBitsPixel == 32); > >diff --git a/Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.cpp b/Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.cpp >index f6fcd5794f79f692abe772a8273b71a8470dd338..388e055b7d0aef15bd3d731391e3fd7e1e1d18ed 100644 >--- a/Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.cpp >+++ b/Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.cpp >@@ -329,7 +329,7 @@ static void updateMenuItemForHistoryItem(HMENU menu, IWebHistoryItem& historyIte > { > UINT menuID = IDM_HISTORY_LINK0 + currentHistoryItem; > >- MENUITEMINFO menuItemInfo = { 0 }; >+ MENUITEMINFO menuItemInfo = { }; > menuItemInfo.cbSize = sizeof(MENUITEMINFO); > menuItemInfo.fMask = MIIM_TYPE; > menuItemInfo.fType = MFT_STRING; >diff --git a/Tools/MiniBrowser/win/WinMain.cpp b/Tools/MiniBrowser/win/WinMain.cpp >index 426a09eb0e6ecc785801a77b2007851ac4700af4..cad2ab62815b3ca135f0f5f853a304565dd248b4 100644 >--- a/Tools/MiniBrowser/win/WinMain.cpp >+++ b/Tools/MiniBrowser/win/WinMain.cpp >@@ -41,7 +41,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, > _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); > #endif > >- MSG msg = {0}; >+ MSG msg = { }; > HACCEL hAccelTable; > > INITCOMMONCONTROLSEX InitCtrlEx; >diff --git a/Tools/TestWebKitAPI/win/HostWindow.cpp b/Tools/TestWebKitAPI/win/HostWindow.cpp >index 74c947d9eb015e9f8847abbab41e6cb551fafcef..3e7978eac321124f56330a5371c8de72303b91b2 100644 >--- a/Tools/TestWebKitAPI/win/HostWindow.cpp >+++ b/Tools/TestWebKitAPI/win/HostWindow.cpp >@@ -50,9 +50,9 @@ HostWindow::~HostWindow() > > RECT HostWindow::clientRect() const > { >- RECT rect = {0}; >+ RECT rect = { }; > if (!::GetClientRect(m_window, &rect)) { >- RECT emptyRect = {0}; >+ RECT emptyRect = { }; > return emptyRect; > } > return rect; >@@ -65,7 +65,7 @@ void HostWindow::registerWindowClass() > return; > initialized = true; > >- WNDCLASSEXW wndClass = {0}; >+ WNDCLASSEXW wndClass = { }; > wndClass.cbSize = sizeof(wndClass); > wndClass.style = CS_HREDRAW | CS_VREDRAW; > wndClass.lpfnWndProc = wndProc; >diff --git a/Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp b/Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp >index 1c0c689e1615b91147bce09be7c7647d57abba27..f9bf93fda29a51346fb3d425b00092be5ba63d84 100644 >--- a/Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp >+++ b/Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp >@@ -47,7 +47,7 @@ void PlatformWebView::registerWindowClass() > return; > initialized = true; > >- WNDCLASSEXW wndClass = {0}; >+ WNDCLASSEXW wndClass = { }; > wndClass.cbSize = sizeof(wndClass); > wndClass.style = CS_HREDRAW | CS_VREDRAW; > wndClass.lpfnWndProc = wndProc; >diff --git a/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp b/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp >index dc9d3a1efdfb75f60e51273fe60b0d4cfe41e05f..57f495a1062a91fba1290d97b6e00588efe3cb2f 100644 >--- a/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp >+++ b/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp >@@ -49,7 +49,7 @@ static void registerWindowClass() > return; > initialized = true; > >- WNDCLASSEXW wndClass = {0}; >+ WNDCLASSEXW wndClass = { }; > wndClass.cbSize = sizeof(wndClass); > wndClass.style = CS_HREDRAW | CS_VREDRAW; > wndClass.lpfnWndProc = DefWindowProc; >@@ -117,7 +117,7 @@ void PlatformWebView::focus() > > WKRect PlatformWebView::windowFrame() > { >- WKRect wkFrame = {0}; >+ WKRect wkFrame = { }; > RECT r; > > if (::GetWindowRect(m_window, &r)) { >@@ -203,7 +203,7 @@ cairo_surface_t* PlatformWebView::windowSnapshotImage() > WebCore::HWndDC windowDC(m_window); > auto memoryDC = adoptGDIObject(::CreateCompatibleDC(windowDC)); > >- BITMAPINFO bitmapInfo = {0}; >+ BITMAPINFO bitmapInfo = { }; > WKRect wkFrame = windowFrame(); > bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); > bitmapInfo.bmiHeader.biWidth = width; >@@ -230,7 +230,7 @@ cairo_surface_t* PlatformWebView::windowSnapshotImage() > 0, > SRCCOPY); > >- BITMAP bitmapTag = {0}; >+ BITMAP bitmapTag = { }; > GetObject(bitmap.get(), sizeof(bitmapTag), &bitmapTag); > ASSERT(bitmapTag.bmBitsPixel == 32); >
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 192584
:
357042
|
357044