WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
259100
Fix clang-cl warnings of WebCore for Windows port
https://bugs.webkit.org/show_bug.cgi?id=259100
Summary
Fix clang-cl warnings of WebCore for Windows port
Fujii Hironori
Reported
2023-07-11 00:46:22 PDT
clang-cl reports the following warnings: C:\home\webkit\gc\Source\WebCore\platform\graphics\win\ComplexTextControllerUniscribe.cpp(141,9): warning: unused variable 'i' [-Wunused-variable] int i = 0; ^ C:\home\webkit\gc\Source\WebCore\platform\graphics\egl\GLContext.cpp(228,29): warning: enumeration value 'Windows' not handled in switch [-Wswitch] switch (platformDisplay.type()) { ~~~~~~~~~~~~~~~~^~~~~~ C:\home\webkit\gc\Source\WebCore\platform\graphics\egl\GLContext.cpp(359,33): warning: enumeration value 'Windows' not handled in switch [-Wswitch] switch (platformDisplay.type()) { ~~~~~~~~~~~~~~~~^~~~~~ C:\home\webkit\gc\Source\WebCore\platform\graphics\egl\GLContext.cpp(406,33): warning: enumeration value 'Windows' not handled in switch [-Wswitch] switch (platformDisplay.type()) { ~~~~~~~~~~~~~~~~^~~~~~ C:\home\webkit\gc\Source\WebCore\platform\win\KeyEventWin.cpp(238,7): warning: field 'm_windowsVirtualKeyCode' will be initialized after field 'm_autoRepeat' [-Wreorder-ctor] , m_windowsVirtualKeyCode((type == Type::RawKeyDown || type == Type::KeyUp) ? windowsKeycodeWithLocation(code, keyData) : 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ m_key(type == PlatformEvent::Type::Char ? windowsKeyNames().domKeyFromChar(code) : windowsKeyNames().domKeyFromParams(code, keyData)) C:\home\webkit\gc\Source\WebCore\platform\win\PlatformMouseEventWin.cpp(86,7): warning: field 'm_buttons' will be initialized after field 'm_clickCount' [-Wreorder-ctor] , m_buttons(buttonsForEvent(wParam)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ m_clickCount(0) C:\home\webkit\gc\Source\WebCore\platform\win\WheelEventWin.cpp(78,7): warning: field 'm_globalPosition' will be initialized after field 'm_directionInvertedFromDevice' [-Wreorder-ctor] , m_globalPosition(globalPositionForEvent(hWnd, lParam)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ m_position(positionForEvent(hWnd, lParam)) C:\home\webkit\gc\Source\WebCore\platform\graphics\win\MediaPlayerPrivateMediaFoundation.cpp(84,13): warning: delete called on non-final 'WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor] delete this; ^ C:\home\webkit\gc\Source\WebCore\platform\graphics\win\MediaPlayerPrivateMediaFoundation.cpp(2834,26): warning: unused variable 'image' [-Wunused-variable] cairo_surface_t* image = nullptr; ^ C:\home\webkit\gc\Source\WebCore\Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp(154,31): warning: lambda capture 'this' is not used [-Wunused-lambda-capture] promise->whenSettled([this, protectedItem = Ref { m_item }, destination = m_writingDestination, promise, type, weakItemTypeLoader = WTFMove(wl)] () mutable { ^ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\type_traits(1484,21): note: in instantiation of function template specialization 'WebCore::ClipboardItemBindingsDataSource::collectDataForWriting(Clipboard &, CompletionHandler<void (std::optional<PasteboardCustomData>)> &&)::(anonymous class)::operator()<const WTF::KeyValuePair<WTF::String, WTF::RefPtr<WebCore::DOMPromise>>>' requested here -> decltype(static_cast<_Callable&&>(_Obj)(static_cast<_Types&&>(_Args)...)) { ^ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\type_traits(1686,43): note: while substituting deduced template arguments into function template '_Call' [with _Callable = (lambda at C:\home\webkit\gc\Source\WebCore\Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:143:44), _Types = <const WTF::KeyValuePair<WTF::String, WTF::RefPtr<WebCore::DOMPromise>> &>] using _Decltype_invoke_nonzero = decltype(_Invoker1<_Callable, _Ty1>::_Call( ^ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\type_traits(1690,38): note: in instantiation of template type alias '_Decltype_invoke_nonzero' requested here struct _Invoke_traits_nonzero<void_t<_Decltype_invoke_nonzero<_Callable, _Ty1, _Types2...>>, _Callable, _Ty1, ^ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\type_traits(1747,40): note: during template argument deduction for class template partial specialization '_Invoke_traits_nonzero<void_t<_Decltype_invoke_nonzero<_Callable, _Ty1, _Types2...>>, _Callable, _Ty1, _Types2...>' [with _Callable = (lambda at C:\home\webkit\gc\Source\WebCore\Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:143:44), _Ty1 = const WTF::KeyValuePair<WTF::String, WTF::RefPtr<WebCore::DOMPromise>> &, _Types2 = <>] inline constexpr bool is_invocable_v = _Select_invoke_traits<_Callable, _Args...>::_Is_invocable::value; ^ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\type_traits(1747,40): note: in instantiation of template class 'std::_Invoke_traits_nonzero<void, (lambda at C:\home\webkit\gc\Source\WebCore\Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:143:44), const WTF::KeyValuePair<WTF::String, WTF::RefPtr<WebCore::DOMPromise>> &>' requested here C:\home\webkit\gc\WebKitBuild\Debug\WTF\Headers\wtf/Vector.h(911,60): note: in instantiation of variable template specialization 'std::is_invocable_v<(lambda at C:\home\webkit\gc\Source\WebCore\Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:143:44), const WTF::KeyValuePair<WTF::String, WTF::RefPtr<WebCore::DOMPromise>> &>' requested here auto map(MapFunction&&) const -> std::enable_if_t<std::is_invocable_v<MapFunction, const T&>, Vector<typename std::invoke_result_t<MapFunction, const T&>>>; ^ C:\home\webkit\gc\Source\WebCore\Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp(143,40): note: while substituting deduced template arguments into function template 'map' [with MapFunction = (lambda at C:\home\webkit\gc\Source\WebCore\Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:143:44)] m_itemTypeLoaders = m_itemPromises.map([&] (auto& typeAndItem) { ^ C:\home\webkit\gc\Source\WebCore\dom/FullscreenManager.cpp(299,65): warning: lambda capture 'this' is not used [-Wunused-lambda-capture] m_document.eventLoop().queueTask(TaskSource::MediaElement, [this, weakThis = WeakPtr { *this }, topDocument = WTFMove(topDocument), identifier = LOGIDENTIFIER] { ^~~~~ C:\home\webkit\gc\Source\WebCore\rendering\RenderTable.h(66,23): warning: inline function 'WebCore::RenderTable::borderTop' is not defined [-Wundefined-inline] inline LayoutUnit borderTop() const override; ^ C:\home\webkit\gc\Source\WebCore\rendering\mathml\RenderMathMLBlockInlines.h(37,27): note: used here inline RenderMathMLTable::RenderMathMLTable(MathMLElement& element, RenderStyle&& style) ^ In file included from C:\home\webkit\gc\WebKitBuild\Debug\WebCore\DerivedSources\unified-sources\UnifiedSource-30d54728-2.cpp:1: In file included from C:\home\webkit\gc\Source\WebCore\mathml/MathMLPresentationElement.cpp:41: In file included from C:\home\webkit\gc\Source\WebCore\rendering\mathml\RenderMathMLBlockInlines.h:32: In file included from C:\home\webkit\gc\Source\WebCore\rendering\mathml/RenderMathMLBlock.h:34: C:\home\webkit\gc\Source\WebCore\rendering\RenderTable.h(67,23): warning: inline function 'WebCore::RenderTable::borderBottom' is not defined [-Wundefined-inline] inline LayoutUnit borderBottom() const override; ^ C:\home\webkit\gc\Source\WebCore\rendering\mathml\RenderMathMLBlockInlines.h(37,27): note: used here inline RenderMathMLTable::RenderMathMLTable(MathMLElement& element, RenderStyle&& style) ^
Attachments
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2023-07-11 00:54:29 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/15732
EWS
Comment 2
2023-07-12 13:00:10 PDT
Committed
266001@main
(afbcfab2cefd): <
https://commits.webkit.org/266001@main
> Reviewed commits have been landed. Closing PR #15732 and removing active labels.
Radar WebKit Bug Importer
Comment 3
2023-07-12 13:01:18 PDT
<
rdar://problem/112153325
>
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