[FFmpeg-devel] [PATCH 4/5] avfilter: avoid zero arguments to variadic macro

Ganesh Ajjanagadde gajjanag at mit.edu
Sat Oct 24 20:01:07 CEST 2015


On Sat, Oct 24, 2015 at 1:48 PM, Michael Niedermayer
<michael at niedermayer.cc> wrote:
> On Sat, Oct 24, 2015 at 03:52:25PM +0200, Nicolas George wrote:
>> Le tridi 3 brumaire, an CCXXIV, Ganesh Ajjanagadde a écrit :
>> > Thanks for the super quick review. Will apply shortly. Do you (or
>> > others) think adding -Wgnu-zero-variadic-macro-arguments to configure
>> > is a good idea?
>>
>> Considering that each additional option takes ~15 ms in configure on a
>> fairly powerful box, not counting maintenance burden, I would say rather no.
>
> about 10ms here with
>     time ./configure
> about 1.5ms here with
>     time ./configure --cc='ccache gcc'  --tempprefix=/home/michael/ffconftemp
>
> also we could speed configure up with something like this:
> (or a more generic "all before each" checker)
>
> diff --git a/configure b/configure
> index a38b290..6fa3273 100755
> --- a/configure
> +++ b/configure
> @@ -5637,6 +5637,9 @@ disabled iconv || check_func_headers iconv.h iconv || check_lib2 iconv.h iconv -
>  enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
>
>  # add some useful compiler flags if supported
> +if ! check_cflags -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls \
> +                  -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body ; then
> +
>  check_cflags -Wdeclaration-after-statement
>  check_cflags -Wall
>  check_cflags -Wdisabled-optimization
> @@ -5649,6 +5652,9 @@ check_cflags -Wmissing-prototypes
>  check_cflags -Wno-pointer-to-int-cast
>  check_cflags -Wstrict-prototypes
>  check_cflags -Wempty-body
> +#Note, if you add a check_cflags here, also add it to the if above
> +fi
> +
>  enabled extra_warnings && check_cflags -Winline
>
>  check_disable_warning(){

Will leave it to you (or others) for such patches (to speed up
configure and/or add warnings), I am fine either way.

>
>
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> No snowflake in an avalanche ever feels responsible. -- Voltaire
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list