Subject: Re: Warnings during building

Re: Warnings during building

From: Simon Josefsson <simon_at_josefsson.org>
Date: Mon, 14 Dec 2009 15:51:41 +0100

Alexander Lamaison <swish_at_lammy.co.uk> writes:

> 2009/12/14 Simon Josefsson <simon_at_josefsson.org>:
>> Daniel Stenberg <daniel_at_haxx.se> writes:
>>
>>> On Mon, 14 Dec 2009, Simon Josefsson wrote:
>>>
>>> To do it _really_ portable, I figure we should use a macro as
>>> UNUSED(enc) and then we let preprocessor magic decide the best way for
>>> the particular compiler used.
>>
>> Assuming that is even possible -- I could imagine some compilers will
>> want the change in the prototype, some in the function body, some in the
>> function definition, and so on...
>
> Are we perhaps overthinking this? :-P

Any solution that solves the problem is welcome. Right now we have one
concrete suggestion: to mark the unused variables with (void) in the
function body.

> That said, I thought the accepted way to deal with unreferenced
> parameters was to comment them out.

That doesn't always work where the required parameters in the prototype
is determined somewhere else than where it is implemented (which happens
when you have multiple backends implementing the same generic
interface).

/Simon
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2009-12-14