Bug 191453 - MediaPlayerPrivateMediaFoundation.h: warning: 'GetService' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
Summary: MediaPlayerPrivateMediaFoundation.h: warning: 'GetService' overrides a member...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-08 20:53 PST by Fujii Hironori
Modified: 2018-11-09 10:20 PST (History)
6 users (show)

See Also:


Attachments
Patch (13.98 KB, patch)
2018-11-08 21:01 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2018-11-08 20:53:01 PST
Clang-cl reports following compilation warnings while building WinCairo port:

> [5097/6223] Building CXX object Source\WebCore\CMakeFiles\WebCore.dir\platform\graphics\win\MediaPlayerPrivateMediaFoundation.cpp.obj
> In file included from ..\..\Source\WebCore\platform\graphics\win\MediaPlayerPrivateMediaFoundation.cpp:28:
> ..\..\Source\WebCore\platform\graphics\win/MediaPlayerPrivateMediaFoundation.h(361,43):  warning: 'GetService' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
>         virtual HRESULT STDMETHODCALLTYPE GetService(REFGUID guidService, REFIID riid, LPVOID *ppvObject);
>                                           ^
> C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um/mfidl.h(4891,43):  note: overridden virtual function is here
>         virtual HRESULT STDMETHODCALLTYPE GetService( 
>                                           ^
> In file included from ..\..\Source\WebCore\platform\graphics\win\MediaPlayerPrivateMediaFoundation.cpp:28:
> ..\..\Source\WebCore\platform\graphics\win/MediaPlayerPrivateMediaFoundation.h(364,43):  warning: 'ActivateObject' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
>         virtual HRESULT STDMETHODCALLTYPE ActivateObject(REFIID riid, void **ppv);
>                                           ^
> C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um/mfobjects.h(5264,43):  note: overridden virtual function is here
>         virtual HRESULT STDMETHODCALLTYPE ActivateObject( 
>                                           ^
> In file included from ..\..\Source\WebCore\platform\graphics\win\MediaPlayerPrivateMediaFoundation.cpp:28:
> ..\..\Source\WebCore\platform\graphics\win/MediaPlayerPrivateMediaFoundation.h(365,43):  warning: 'DetachObject' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
>         virtual HRESULT STDMETHODCALLTYPE DetachObject();
>                                           ^
> C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um/mfobjects.h(5270,43):  note: overridden virtual function is here
>         virtual HRESULT STDMETHODCALLTYPE DetachObject( void) = 0;
>                                           ^
> In file included from ..\..\Source\WebCore\platform\graphics\win\MediaPlayerPrivateMediaFoundation.cpp:28:
> ..\..\Source\WebCore\platform\graphics\win/MediaPlayerPrivateMediaFoundation.h(366,43):  warning: 'ShutdownObject' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
>         virtual HRESULT STDMETHODCALLTYPE ShutdownObject();
>                                           ^
> C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um/mfobjects.h(5268,43):  note: overridden virtual function is here
>         virtual HRESULT STDMETHODCALLTYPE ShutdownObject( void) = 0;
>                                           ^
Comment 1 Fujii Hironori 2018-11-08 21:01:26 PST
Created attachment 354310 [details]
Patch
Comment 2 Don Olmstead 2018-11-08 21:35:15 PST
LGTM

It would probably save you some time to look into running clang tidy now that you have clang cl working. There’s a modernize lint https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html and most of the modernize lints have an associated fix.
Comment 3 Per Arne Vollan 2018-11-09 08:26:41 PST
Comment on attachment 354310 [details]
Patch

r=me.
Comment 4 WebKit Commit Bot 2018-11-09 10:19:16 PST
Comment on attachment 354310 [details]
Patch

Clearing flags on attachment: 354310

Committed r238040: <https://trac.webkit.org/changeset/238040>
Comment 5 WebKit Commit Bot 2018-11-09 10:19:17 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-11-09 10:20:31 PST
<rdar://problem/45947797>