Bug 137107 - Clean up unused parameter warnings
Summary: Clean up unused parameter warnings
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-24 23:16 PDT by Yusuke Suzuki
Modified: 2014-09-25 18:09 PDT (History)
3 users (show)

See Also:


Attachments
Patch (5.14 KB, patch)
2014-09-24 23:17 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (3.12 KB, patch)
2014-09-25 03:28 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2014-09-24 23:16:08 PDT
[GTK] Clean up unused parameter warnings
Comment 1 Yusuke Suzuki 2014-09-24 23:17:12 PDT
Created attachment 238643 [details]
Patch
Comment 2 Csaba Osztrogonác 2014-09-25 03:19:03 PDT
Comment on attachment 238643 [details]
Patch

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

> Source/WebKit2/WebProcess/WebPage/WebInspector.h:62
> -    void didReceiveInvalidMessage(IPC::Connection*, IPC::StringReference messageReceiverName, IPC::StringReference messageName) { close(); }
> +    void didReceiveInvalidMessage(IPC::Connection*, IPC::StringReference messageReceiverName, IPC::StringReference messageName)
> +    {
> +        UNUSED_PARAM(messageReceiverName);
> +        UNUSED_PARAM(messageName);
> +        close();
> +    }

In this case we should simple remove the name of the parameter.
UNUSED_PARAM is used if the parameter is unused only if
some ENABLE(FOO) guard is true or false.

Otherwise it is already fixed in bug137105.

> Source/WebKit2/WebProcess/WebPage/WebInspectorUI.h:57
> -    void didReceiveInvalidMessage(IPC::Connection*, IPC::StringReference messageReceiverName, IPC::StringReference messageName) { closeWindow(); }
> +    void didReceiveInvalidMessage(IPC::Connection*, IPC::StringReference messageReceiverName, IPC::StringReference messageName)
> +    {
> +        UNUSED_PARAM(messageReceiverName);
> +        UNUSED_PARAM(messageName);
> +        closeWindow();
> +    }

Already fixed in bug137105.
Comment 3 Yusuke Suzuki 2014-09-25 03:22:23 PDT
Comment on attachment 238643 [details]
Patch

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

Thank you for your review, I'll upload the revised one.

> Source/WebKit2/Scripts/webkit/messages.py:624
>              result.append('    UNUSED_PARAM(connection);\n')

In this case, we may use `connection` in the generated code.
So using `UNUSED_PARAM`. It is aligned to the following `UNUSED_PARAM(decoder)` etc.

> Source/WebKit2/UIProcess/API/C/WKPage.cpp:1885
>  bool WKPageIsPlayingAudio(WKPageRef page)

I'll drop `page` instead of adding `UNUSED_PARAM(page)`.

>> Source/WebKit2/WebProcess/WebPage/WebInspector.h:62
>> +    }
> 
> In this case we should simple remove the name of the parameter.
> UNUSED_PARAM is used if the parameter is unused only if
> some ENABLE(FOO) guard is true or false.
> 
> Otherwise it is already fixed in bug137105.

Thanks! OK, so I'll drop this change from this patch.

>> Source/WebKit2/WebProcess/WebPage/WebInspectorUI.h:57
>> +    }
> 
> Already fixed in bug137105.

ditto :)
Comment 4 Yusuke Suzuki 2014-09-25 03:28:10 PDT
Created attachment 238653 [details]
Patch
Comment 5 WebKit Commit Bot 2014-09-25 18:09:47 PDT
Comment on attachment 238653 [details]
Patch

Clearing flags on attachment: 238653

Committed r173990: <http://trac.webkit.org/changeset/173990>
Comment 6 WebKit Commit Bot 2014-09-25 18:09:51 PDT
All reviewed patches have been landed.  Closing bug.