[libav-devel] [PATCH 5/5] cmdutils: Move an ifdef to avoid unused variable warnings with lavfi disabled

Luca Barbato lu_zero at gentoo.org
Fri Sep 5 02:00:22 CEST 2014


On 05/09/14 00:47, Diego Biurrun wrote:
> ---
>  cmdutils.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/cmdutils.c b/cmdutils.c
> index 202b288..5c91e53 100644
> --- a/cmdutils.c
> +++ b/cmdutils.c
> @@ -1161,10 +1161,10 @@ int show_protocols(void *optctx, const char *opt, const char *arg)
>  
>  int show_filters(void *optctx, const char *opt, const char *arg)
>  {
> -    const AVFilter av_unused(*filter) = NULL;
> +#if CONFIG_AVFILTER
> +    const AVFilter *filter = NULL;
>  
>      printf("Filters:\n");
> -#if CONFIG_AVFILTER
>      while ((filter = avfilter_next(filter)))
>          printf("%-16s %s\n", filter->name, filter->description);
>  #endif
> 

might be nicer

#if CONFIG_
...
#else
printf("No filters available: libavfilter disabled");
#endif

Or something like that.

lu




More information about the libav-devel mailing list