Bug 137107

Summary: Clean up unused parameter warnings
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, mrobinson, ossy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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.