On Wed, Nov 23, 2016 at 09:12:08AM +0100, Anton Khirnov wrote:
> Quoting Diego Biurrun (2016-11-18 10:46:05)
> > --- a/libavformat/ape.c
> > +++ b/libavformat/ape.c
> > @@ -94,9 +94,9 @@ static int ape_probe(AVProbeData * p)
> >
> > +#ifdef DEBUG
> > static void ape_dumpinfo(AVFormatContext * s, APEContext * ape_ctx)
> > {
> > -#ifdef DEBUG
> > int i;
> >
> > @@ -154,8 +154,10 @@ static void ape_dumpinfo(AVFormatContext * s,
> > APEContext * ape_ctx)
> > av_log(s, AV_LOG_DEBUG, "firstframe = %"PRIu32"\n",
> > ape_ctx->firstframe);
> > av_log(s, AV_LOG_DEBUG, "totalsamples = %"PRIu32"\n",
> > ape_ctx->totalsamples);
> > -#endif
> > }
> > +#else
> > +#define ape_dumpinfo(s, ape_ctx)
> > +#endif
>
> This is incredibly silly IMO. Unused function parameters are very common
> and are NOT a problem (which is why they are not enabled by default).
> Shuffling perfectly valid code around just to appease some specific
> compiler with some specific settings is just useless noise in history.
I disagree. It's true that e.g. unused function pointer parameters are
harmless and unavoidable sometimes. But in general unused function
parameters are a confusing nuisance and clutter that should be avoided
just as much as unused variables.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel