Bug 96985 - Propose UNUSED_PARAMS macro
Summary: Propose UNUSED_PARAMS macro
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mikhail Pozdnyakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-18 00:11 PDT by Mikhail Pozdnyakov
Modified: 2013-01-03 03:00 PST (History)
8 users (show)

See Also:


Attachments
patch (2.28 KB, patch)
2012-09-18 00:22 PDT, Mikhail Pozdnyakov
benjamin: review-
buildbot: commit-queue-
Details | Formatted Diff | Diff
patch v2 (2.35 KB, patch)
2012-09-18 03:28 PDT, Mikhail Pozdnyakov
gtk-ews: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Pozdnyakov 2012-09-18 00:11:21 PDT
While being fixing compiler warnings about unused variables (bug96901) I found it useful to have UNUSED_PARAMS macro accepting a list of unused variables in order to safe some lines of code in case when we have to mark several arguments as unused (for instance in case of empty implementation of a method).
Comment 1 Mikhail Pozdnyakov 2012-09-18 00:22:22 PDT
Created attachment 164505 [details]
patch
Comment 2 Build Bot 2012-09-18 00:51:44 PDT
Comment on attachment 164505 [details]
patch

Attachment 164505 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/13898087
Comment 3 Benjamin Poulain 2012-09-18 01:43:38 PDT
Comment on attachment 164505 [details]
patch

This is not needed. 
Our policy is to not put the argument names when they are not used. There is also no need to update URLParser.h, that code will either be implemented or removed entirely.
Comment 4 Kenneth Rohde Christiansen 2012-09-18 02:23:12 PDT
(In reply to comment #3)
> (From update of attachment 164505 [details])
> This is not needed. 
> Our policy is to not put the argument names when they are not used. There is also no need to update URLParser.h, that code will either be implemented or removed entirely.

That is not entirely true for headers through. They are normally added when they add more information.
Comment 5 Mikhail Pozdnyakov 2012-09-18 02:34:27 PDT
(In reply to comment #3)
> (From update of attachment 164505 [details])
> This is not needed. 
> Our policy is to not put the argument names when they are not used. There is also no need to update URLParser.h, that code will either be implemented or removed entirely.

Should than UNUSED_PARAM macro exist in WebKit in principal? or it should be considered as deprecated and will be deleted eventually?
Comment 6 Mikhail Pozdnyakov 2012-09-18 03:28:29 PDT
Created attachment 164526 [details]
patch v2

Should build on gtk and mac
Comment 7 kov's GTK+ EWS bot 2012-09-18 03:48:27 PDT
Comment on attachment 164526 [details]
patch v2

Attachment 164526 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/13904118
Comment 8 Benjamin Poulain 2012-09-18 10:23:42 PDT
Unless you have a good use case, I don't think we should add this.

Please _do not_ modify URLParser.h. My local version differ significantly.
Comment 9 Alexey Proskuryakov 2012-09-18 11:23:08 PDT
I agree with Benjamin. It's unlikely that we have many places to deploy this.
Comment 10 Mikhail Pozdnyakov 2013-01-03 03:00:05 PST
close based on previous comments