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

Gyuyoung Kim gyuyoung at gmail.com
Mon Oct 1 11:38:37 PDT 2012


Thank you for kindly explanations. I will guide this according to this
mailing list.

Gyuyoung.

On Tue, Oct 2, 2012 at 3:33 AM, Ryosuke Niwa <rniwa at webkit.org> wrote:

> On Mon, Oct 1, 2012 at 11:30 AM, Oliver Hunt <oliver at apple.com> wrote:
>
>>
>> On Oct 1, 2012, at 8:47 AM, Ryosuke Niwa <rniwa at webkit.org> wrote:
>>
>> On Mon, Oct 1, 2012 at 7:07 AM, 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.
>>>
>>
>> or only used in ASSERTs.
>>
>>
>> That's what the ASSERT_UNUSED(variable, assertion) macro is for :D
>>
>
> Yeah, just realized by reading Darin's reply.
>
> - Ryosuke
>
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-dev
>
>


-- 
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/20121002/646a60c2/attachment.html>


More information about the webkit-dev mailing list