[FFmpeg-devel] [FFmpeg-cvslog] configure: Disable -Wbool-operation.

Mark Thompson sw at jkqxz.net
Mon Oct 9 02:26:15 EEST 2017


On 08/10/17 22:08, Carl Eugen Hoyos wrote:
> ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Sun Oct  8 23:08:09 2017 +0200| [c2d155e11ee5ec732d471982f2dee43703bcd5a7] | committer: Carl Eugen Hoyos
> 
> configure: Disable -Wbool-operation.
> 
> Requested-by: Ronald and Derek
> 
>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c2d155e11ee5ec732d471982f2dee43703bcd5a7
> ---
> 
>  configure | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configure b/configure
> index 77c9a18c3c..d5e96e95e1 100755
> --- a/configure
> +++ b/configure
> @@ -6291,6 +6291,7 @@ check_cflags -Wmissing-prototypes
>  check_cflags -Wno-pointer-to-int-cast
>  check_cflags -Wstrict-prototypes
>  check_cflags -Wempty-body
> +check_cflags -Wno-bool-operation
>  
>  if enabled extra_warnings; then
>      check_cflags -Wcast-qual
> 

Following this I am now getting a lot of:

src/libavformat/dump.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-bool-operation’

for every file which has other warnings.

$ gcc --version
gcc (Debian 6.3.0-18) 6.3.0 20170516

The test in configure passes, I think because:

<https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html>:
"""
When an unrecognized warning option is requested (e.g., -Wunknown-warning), GCC emits a diagnostic stating that the option is not recognized. However, if the -Wno- form is used, the behavior is slightly different: no diagnostic is produced for -Wno-unknown-warning unless other diagnostics are being produced. This allows the use of new -Wno- options with old compilers, but if something goes wrong, the compiler warns that an unrecognized option is present. 
"""

Not sure exactly how to fix that.  Could we replace the check with something like "-Werror=bool-operation", which does error out when it doesn't find the warning option, and only add the "-Wno-bool-operation" if that works?

Thanks,

- Mark


More information about the ffmpeg-devel mailing list