[ccan] [PATCH] list: suppress unused argument warnings

Rusty Russell rusty at rustcorp.com.au
Mon Aug 17 11:48:18 AEST 2015


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...

Thanks!
Rusty.

Cody P Schafer <dev at codyps.com> writes:
> Signed-off-by: Cody P Schafer <dev at codyps.com>
> ---
>  ccan/list/list.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/ccan/list/list.h b/ccan/list/list.h
> index 118d9cf..0e4bd44 100644
> --- a/ccan/list/list.h
> +++ b/ccan/list/list.h
> @@ -95,8 +95,8 @@ struct list_node *list_check_node(const struct list_node *n,
>  #define list_debug(h, loc) list_check((h), loc)
>  #define list_debug_node(n, loc) list_check_node((n), loc)
>  #else
> -#define list_debug(h, loc) (h)
> -#define list_debug_node(n, loc) (n)
> +#define list_debug(h, loc) ((void)loc, h)
> +#define list_debug_node(n, loc) ((void)loc, n)
>  #endif
>  
>  /**
> -- 
> 2.5.0
>
> _______________________________________________
> ccan mailing list
> ccan at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/ccan


More information about the ccan mailing list