mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-19 19:42:24 +02:00
build: exclude -Wredundant-decls
It's useless, and creates a bogus warning in subprocess-posix.c. Since I don't know which compilers might have it by default, just change it to -Wno-redundant-decls.
This commit is contained in:
parent
0f063a5011
commit
27f7489adc
@ -376,7 +376,7 @@ addcflags() { cflag_check "$@" && OURCFLAGS="$OURCFLAGS $@" ; }
|
||||
OURCFLAGS="-std=c99 -Wall $_opt"
|
||||
|
||||
addcflags -g -g3 -ggdb
|
||||
addcflags -Wundef -Wmissing-prototypes -Wshadow -Wno-switch -Wparentheses -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Werror=implicit-function-declaration -Wno-error=deprecated-declarations -Wno-error=unused-function
|
||||
addcflags -Wundef -Wmissing-prototypes -Wshadow -Wno-switch -Wparentheses -Wpointer-arith -Wno-redundant-decls -Wno-pointer-sign -Werror=implicit-function-declaration -Wno-error=deprecated-declarations -Wno-error=unused-function
|
||||
# clang
|
||||
addcflags -Wno-logical-op-parentheses -fcolor-diagnostics -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare
|
||||
# extra
|
||||
|
@ -30,8 +30,6 @@
|
||||
#include "common/common.h"
|
||||
#include "stream/stream.h"
|
||||
|
||||
// Normally, this must be declared manually, but glibc is retarded
|
||||
// resulting in a warning.
|
||||
extern char **environ;
|
||||
|
||||
// A silly helper: automatically skips entries with negative FDs
|
||||
|
@ -35,12 +35,13 @@ def __add_generic_flags__(ctx):
|
||||
"-Wdisabled-optimization",
|
||||
"-Wstrict-prototypes",
|
||||
"-Wno-format-zero-length",
|
||||
"-Werror=format-security"])
|
||||
"-Werror=format-security",
|
||||
"-Wno-redundant-decls"])
|
||||
|
||||
def __add_gcc_flags__(ctx):
|
||||
ctx.env.CFLAGS += ["-Wall", "-Wundef", "-Wmissing-prototypes", "-Wshadow",
|
||||
"-Wno-switch", "-Wparentheses", "-Wpointer-arith",
|
||||
"-Wredundant-decls", "-Wno-pointer-sign"]
|
||||
"-Wno-pointer-sign"]
|
||||
|
||||
def __add_clang_flags__(ctx):
|
||||
ctx.env.CFLAGS += ["-Wno-logical-op-parentheses", "-fcolor-diagnostics",
|
||||
|
Loading…
Reference in New Issue
Block a user