check_cflags -Wdisabled-optimization
check_cflags -Wpointer-arith
check_cflags -Wredundant-decls
- check_cflags -Wno-pointer-sign
-check_cflags -Wcast-qual
check_cflags -Wwrite-strings
check_cflags -Wtype-limits
check_cflags -Wundef
check_cflags -Wstrict-prototypes
enabled extra_warnings && check_cflags -Winline
+ check_disable_warning(){
+ warning_flag=-W${1#-Wno-}
+ test_cflags $warning_flag && add_cflags $1
+ }
+
+ check_disable_warning -Wno-parentheses
+ check_disable_warning -Wno-switch
+ check_disable_warning -Wno-format-zero-length
+ check_disable_warning -Wno-pointer-sign
+ enabled extra_warnings || check_disable_warning -Wno-maybe-uninitialized
+
# add some linker flags
check_ldflags -Wl,--warn-common
-check_ldflags -Wl,-rpath-link=libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
+check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
enabled xmm_clobber_test &&
check_cflags -Werror=implicit-function-declaration
check_cflags -Werror=missing-prototypes
check_cflags -Werror=return-type
- check_cflags -Werror=declaration-after-statement
check_cflags -Werror=vla
- enabled extra_warnings || check_cflags -Wno-maybe-uninitialized
elif enabled llvm_gcc; then
check_cflags -mllvm -stack-alignment=16
elif enabled clang; then