Bug 192584

Summary: [Win][Clang] Fix warning -Wmissing-field-initializers
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: New BugsAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 171618    
Attachments:
Description Flags
Patch
none
Patch none

Description Fujii Hironori 2018-12-11 01:03:07 PST
[Win][Clang] Fix warning -Wmissing-field-initializers

clang-cl reports the following compilation warnings:

> ..\..\Source\WebCore\platform\graphics\win\MediaPlayerPrivateFullscreenWindow.cpp(64,29):  warning: missing field 'style' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\graphics\win\MediaPlayerPrivateFullscreenWindow.cpp(75,24):  warning: missing field 'rcMonitor' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\DefWndProcWindowClass.cpp(38,28):  warning: missing field 'lpfnWndProc' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\graphics\win\FontCacheWin.cpp(377,43):  warning: missing field 'iBorderWidth' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\CursorWin.cpp(114,27):  warning: missing field 'xHotspot' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\ClipboardUtilitiesWin.cpp(427,28):  warning: missing field '' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\ClipboardUtilitiesWin.cpp(449,28):  warning: missing field '' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\ClipboardUtilitiesWin.cpp(757,26):  warning: missing field '' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\ClipboardUtilitiesWin.cpp(769,26):  warning: missing field '' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\ClipboardUtilitiesWin.cpp(788,26):  warning: missing field '' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\DragImageWin.cpp(76,25):  warning: missing field 'iIcon' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\PasteboardWin.cpp(376,26):  warning: missing field '' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\PasteboardWin.cpp(420,30):  warning: missing field '' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\PasteboardWin.cpp(443,26):  warning: missing field '' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\PasteboardWin.cpp(508,26):  warning: missing field '' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\PasteboardWin.cpp(609,26):  warning: missing field '' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\PasteboardWin.cpp(1066,26):  warning: missing field '' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\SSLKeyGeneratorWin.cpp(63,52):  warning: missing field 'SubjectPublicKeyInfo' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\SSLKeyGeneratorWin.cpp(74,51):  warning: missing field 'Parameters' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebCore\platform\win\PopupMenuWin.cpp(164,27):  warning: missing field 'top' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKit\UIProcess\win\WebPopupMenuProxyWin.cpp(221,27):  warning: missing field 'top' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKit\Shared\win\WebEventFactory.h(44,126):  warning: missing field 'time' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKit\UIProcess\win\WebView.cpp(656,25):  warning: missing field 'uFlags' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKit\UIProcess\win\WebView.cpp(874,29):  warning: missing field 'uFlags' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKitLegacy\win\WebKitMessageLoop.cpp(87,19):  warning: missing field 'message' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKitLegacy\win\WebView.cpp(1788,37):  warning: missing field 'fMask' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKitLegacy\win\WebView.cpp(2000,24):  warning: missing field 'dwFlags' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKitLegacy\win\WebView.cpp(2487,25):  warning: missing field 'top' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKitLegacy\win\WebView.cpp(3194,23):  warning: missing field 'uFlags' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKitLegacy\win\WebView.cpp(3216,27):  warning: missing field 'uFlags' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKitLegacy\win\WebView.cpp(7579,25):  warning: missing field 'top' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKit\Shared\win/WebEventFactory.h(44,126):  warning: missing field 'time' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKit\Shared\win/WebEventFactory.h(44,126):  warning: missing field 'time' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKit\Shared\win/WebEventFactory.h(44,126):  warning: missing field 'time' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKit\Shared\win/WebEventFactory.h(44,126):  warning: missing field 'time' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKit\UIProcess\Launcher\win\ProcessLauncherWin.cpp(90,35):  warning: missing field 'lpReserved' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKit\UIProcess\Launcher\win\ProcessLauncherWin.cpp(94,50):  warning: missing field 'hThread' initializer [-Wmissing-field-initializers]
> ..\..\Tools\DumpRenderTree\win\PixelDumpSupportWin.cpp(65,24):  warning: missing field 'biWidth' initializer [-Wmissing-field-initializers]
> ..\..\Tools\DumpRenderTree\win\PixelDumpSupportWin.cpp(65,24):  warning: missing field 'bmiColors' initializer [-Wmissing-field-initializers]
> ..\..\Tools\DumpRenderTree\win\PixelDumpSupportWin.cpp(82,21):  warning: missing field 'bmWidth' initializer [-Wmissing-field-initializers]
> ..\..\Tools\DumpRenderTree\win\DumpRenderTree.cpp(1234,19):  warning: missing field 'message' initializer [-Wmissing-field-initializers]
> ..\..\Tools\DumpRenderTree\win\EventSender.cpp(123,20):  warning: missing field 'message' initializer [-Wmissing-field-initializers]
> ..\..\Tools\DumpRenderTree\win\EventSender.cpp(365,19):  warning: missing field 'message' initializer [-Wmissing-field-initializers]
> ..\..\Tools\DumpRenderTree\win\EventSender.cpp(699,31):  warning: missing field '' initializer [-Wmissing-field-initializers]
> ..\..\Tools\DumpRenderTree\win\EventSender.cpp(716,35):  warning: missing field '' initializer [-Wmissing-field-initializers]
> ..\..\Tools\DumpRenderTree\win\EventSender.cpp(928,47):  warning: missing field 'attributes' initializer [-Wmissing-field-initializers]
> ..\..\Tools\WebKitTestRunner\win\PlatformWebViewWin.cpp(52,30):  warning: missing field 'style' initializer [-Wmissing-field-initializers]
> ..\..\Tools\WebKitTestRunner\win\PlatformWebViewWin.cpp(120,24):  warning: missing field 'y' initializer [-Wmissing-field-initializers]
> ..\..\Tools\WebKitTestRunner\win\PlatformWebViewWin.cpp(120,24):  warning: missing field 'size' initializer [-Wmissing-field-initializers]
> ..\..\Tools\WebKitTestRunner\win\PlatformWebViewWin.cpp(206,31):  warning: missing field 'biWidth' initializer [-Wmissing-field-initializers]
> ..\..\Tools\WebKitTestRunner\win\PlatformWebViewWin.cpp(206,31):  warning: missing field 'bmiColors' initializer [-Wmissing-field-initializers]
> ..\..\Tools\WebKitTestRunner\win\PlatformWebViewWin.cpp(233,26):  warning: missing field 'bmWidth' initializer [-Wmissing-field-initializers]
> ..\..\Source\WebKit\Shared\win\WebEventFactory.h(44,126):  warning: missing field 'time' initializer [-Wmissing-field-initializers]
> ..\..\Tools\MiniBrowser\win\WinMain.cpp(44,17):  warning: missing field 'message' initializer [-Wmissing-field-initializers]
> ..\..\Tools\MiniBrowser\win\WebKitBrowserWindow.cpp(107,61):  warning: missing field 'decidePolicyForNavigationAction' initializer [-Wmissing-field-initializers]
> ..\..\Tools\MiniBrowser\win\WebKitLegacyBrowserWindow.cpp(332,37):  warning: missing field 'fMask' initializer [-Wmissing-field-initializers]
> ..\..\Tools\TestWebKitAPI\win\HostWindow.cpp(53,19):  warning: missing field 'top' initializer [-Wmissing-field-initializers]
> ..\..\Tools\TestWebKitAPI\win\HostWindow.cpp(55,28):  warning: missing field 'top' initializer [-Wmissing-field-initializers]
> ..\..\Tools\TestWebKitAPI\win\HostWindow.cpp(68,30):  warning: missing field 'style' initializer [-Wmissing-field-initializers]
> ..\..\Tools\TestWebKitAPI\win\PlatformWebViewWin.cpp(50,30):  warning: missing field 'style' initializer [-Wmissing-field-initializers]
Comment 1 Fujii Hironori 2018-12-11 01:09:20 PST
Created attachment 357042 [details]
Patch
Comment 2 Yusuke Suzuki 2018-12-11 01:16:58 PST
Comment on attachment 357042 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=357042&action=review

> Source/WebCore/platform/graphics/win/FontCacheWin.cpp:377
> +    NONCLIENTMETRICS nonClientMetrics = { };

How about using `NONCLIENTMETRICS nonClientMetrics { }` instead of `= { }`?
Comment 3 Fujii Hironori 2018-12-11 01:49:15 PST
Created attachment 357044 [details]
Patch

Thank you for the review. Addressed the review feedback.
Comment 4 Yusuke Suzuki 2018-12-11 01:57:28 PST
Comment on attachment 357044 [details]
Patch

r=me
Comment 5 Fujii Hironori 2018-12-11 17:17:00 PST
Comment on attachment 357044 [details]
Patch

Clearing flags on attachment: 357044

Committed r239092: <https://trac.webkit.org/changeset/239092>
Comment 6 Fujii Hironori 2018-12-11 17:17:03 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-12-11 17:18:29 PST
<rdar://problem/46647472>