[webkit-dev] Is there a rule to use UNUSED_PARAM ?

Gyuyoung Kim gyuyoung at gmail.com
Mon Oct 1 07:39:51 PDT 2012


I think Dirk's explanation is reasonable. It seems to me that excessive
UNUSED_PARAM masses up codes. From a code readability perspective it is
good to use them commented out when parameter type or function name don't
stand for nothing. If Dirk's suggestion is best, IMHO, it would be good if
someone adds this(/* */) to #9 of webkit coding style Names as well.

Gyuyoung.

On Mon, Oct 1, 2012 at 11:07 PM, Dirk Schulze <krit at webkit.org> wrote:

>
>
> On Monday, October 1, 2012, Gyuyoung Kim wrote:
>
>> Hello WebKit folks,
>>
>> There were build warning related to unused parameter nowadays. I think
>> there are three solutions. One is to remove parameter,
>> another is to use UNUSED_PARAM macro and the other is to use /* */ in
>> parameters.
>>
>> I like to use UNUSED_PARAM macro except for primitive parameters
>> personally, for example
>>
>> void foo(RenderObject* object, int /*width*/, int /*height*/) {
>>     UNUSED_PARAM(object);
>> }
>>
>> I'd like to know what webkittens think about this.
>>
>>>
>>> If it is crystal clear what the parameters stand for, omit them. If not,
> you find them commented out. UNUSED_PARAM is used when just some platforms
> of flagged features use parameters, others not.
>
> Dirk
>
>
>> Cheers,
>> Gyuyoung
>>
>


-- 
Gyuyoung Kim
SW Engineer, WebKit EFL
Email : gyuyoung.kim at webkit.org
Phone : +82 10 9530 0209
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20121001/515463c2/attachment.html>


More information about the webkit-dev mailing list