0
0
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:
wm4 2015-05-09 19:59:52 +02:00
parent 0f063a5011
commit 27f7489adc
3 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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",