Bug 205951 - Suppress "unused parameter" when including libWebRTC headers in LibWebRTCProviderCocoa.cpp
Summary: Suppress "unused parameter" when including libWebRTC headers in LibWebRTCProv...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: DoNotImportToRadar
Depends on:
Blocks:
 
Reported: 2020-01-08 12:42 PST by Wenson Hsieh
Modified: 2020-01-10 09:53 PST (History)
12 users (show)

See Also:


Attachments
Patch (1.72 KB, patch)
2020-01-08 12:47 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2020-01-08 12:42:48 PST
Some unrelated changes to unified source ordering will cause this to become a build error in the future.
Comment 1 Wenson Hsieh 2020-01-08 12:47:30 PST
Created attachment 387129 [details]
Patch
Comment 2 Wenson Hsieh 2020-01-08 13:16:45 PST
Comment on attachment 387129 [details]
Patch

Thanks for the review!
Comment 3 WebKit Commit Bot 2020-01-08 14:10:24 PST
Comment on attachment 387129 [details]
Patch

Clearing flags on attachment: 387129

Committed r254226: <https://trac.webkit.org/changeset/254226>
Comment 4 WebKit Commit Bot 2020-01-08 14:10:25 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Darin Adler 2020-01-09 17:22:29 PST
Why can’t we fix this in WebRTC and upstream the fix, instead?
Comment 6 youenn fablet 2020-01-10 00:49:20 PST
(In reply to Darin Adler from comment #5)
> Why can’t we fix this in WebRTC and upstream the fix, instead?

We could try but I am not sure what the best way is.

One typical example is: virtual void OnDroppedFrame(DropReason reason) {}.

We could remove the parameter name but I am not sure this will align well with libwebrtc coding style. And adding an UNUSED_PARAM does not seem great.

We could also decide to only include the webrtc headers that we control (the ones in Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit) and move the ALLOW_UNUSED_PARAMETERS_XXX in those headers.
Comment 7 Darin Adler 2020-01-10 09:53:28 PST
(In reply to youenn fablet from comment #6)
> One typical example is: virtual void OnDroppedFrame(DropReason reason) {}.
> 
> We could remove the parameter name but I am not sure this will align well
> with libwebrtc coding style.

I don’t know what libwebrtc coding style is, but I would propose this:

    virtual void OnDroppedFrame(DropReason /* reason */) {}

(In reply to youenn fablet from comment #6)
> We could also decide to only include the webrtc headers that we control (the
> ones in Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit) and move the
> ALLOW_UNUSED_PARAMETERS_XXX in those headers.

Yes, I think that would be a little better than distributing this responsibility across WebKit code.