[ccan] [PATCH] list: suppress unused argument warnings
Rusty Russell
rusty at rustcorp.com.au
Wed Aug 19 11:42:44 AEST 2015
Cody P Schafer <dev at codyps.com> writes:
> On Sun, Aug 16, 2015 at 9:48 PM, Rusty Russell <rusty at rustcorp.com.au> wrote:
>> Hi Cody,
>>
>> Is this with -Wunused? I'm tempted to add that to the
>> default flags, since it seems a common option, and will make sure
>> I'm on top of these in future...
>
> gcc-5.2 claims it is -Wunused-parameter, which is enabled by -Wunused.
>
> In file included from pp-tokenize.c:4:0:
> ccan/ccan/list/list.h: In function ‘list_prepend_list_’:
> ccan/ccan/list/list.h:659:23: warning: unused parameter ‘abortstr’
> [-Wunused-parameter]
> const char *abortstr)
Applied your patch.
With -Wunused-parameter I get a lot more warnings when running ccanlint.
My general philosophy is that it's nice to compile clean with warning
options people generally use. I'll o a sweep with -O2 and -Wunused
now.
Thanks!
Rusty.
More information about the ccan
mailing list