[FFmpeg-devel] [PATCH] avutil/attributes: Fix too many warning: false is not defined [-Wundef]

James Almer jamrial at gmail.com
Fri May 29 22:12:44 EEST 2020


On 5/29/2020 8:18 AM, lance.lmwang at gmail.com wrote:
> From: Limin Wang <lance.lmwang at gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
> try to avoid floods of warning message for my testing linux host. If you
> have better way, fix it anyway.
> 
> Below is my Linux system information and gcc version:
> 
> [lmwang at vpn2 ffmpeg.git]$ gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
> Target: x86_64-redhat-linux
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
> Thread model: posix
> gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
> [lmwang at vpn2 ffmpeg.git]$ cat /etc/centos-release
> CentOS Linux release 7.4.1708 (Core)
> 
>  libavutil/attributes.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavutil/attributes.h b/libavutil/attributes.h
> index ab2a1fd..5cb9fe3 100644
> --- a/libavutil/attributes.h
> +++ b/libavutil/attributes.h
> @@ -37,7 +37,7 @@
>  #ifdef __has_builtin
>  #    define AV_HAS_BUILTIN(x) __has_builtin(x)
>  #else
> -#    define AV_HAS_BUILTIN(x) false
> +#    define AV_HAS_BUILTIN(x) 0
>  #endif
>  
>  #ifndef av_always_inline

LGTM


More information about the ffmpeg-devel mailing list