mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
build: add -Wempty-body to compiler flags
Warns against "if(0);" but not "if(0){}" - perfect for our purposes.
This commit is contained in:
@@ -1145,14 +1145,14 @@ if test -z "$CFLAGS" ; then
|
||||
WARNFLAGS="-wd167 -wd556 -wd144"
|
||||
elif test "$cc_vendor" = "clang"; then
|
||||
CFLAGS="$_opt $_debug $_pipe"
|
||||
WARNFLAGS="-Wall -Wno-switch -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes -Wshadow"
|
||||
WARNFLAGS="-Wall -Wno-switch -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes -Wshadow -Wempty-body"
|
||||
ERRORFLAGS="-Werror=implicit-function-declaration -Wno-error=deprecated-declarations -Wno-error=unused-function"
|
||||
elif test "$cc_vendor" != "gnu" ; then
|
||||
CFLAGS="$_opt $_debug $_pipe"
|
||||
else
|
||||
CFLAGS="$_opt $_debug $_pipe"
|
||||
WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls"
|
||||
ERRORFLAGS="-Werror-implicit-function-declaration -Wno-error=deprecated-declarations -Wno-error=unused-function -Wshadow"
|
||||
ERRORFLAGS="-Werror-implicit-function-declaration -Wno-error=deprecated-declarations -Wno-error=unused-function -Wshadow -Wempty-body"
|
||||
extra_ldflags="$extra_ldflags"
|
||||
fi
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user