mirror of
https://github.com/mpv-player/mpv
synced 2025-02-27 10:50:53 +00:00
build: add checks for some compiler warning flags
This commit is contained in:
parent
49c3cbfb4e
commit
00d1d6d807
@ -31,14 +31,14 @@ def __add_generic_flags__(ctx):
|
|||||||
def __add_gcc_flags__(ctx):
|
def __add_gcc_flags__(ctx):
|
||||||
ctx.env.CFLAGS += ["-Wall", "-Wundef", "-Wmissing-prototypes", "-Wshadow",
|
ctx.env.CFLAGS += ["-Wall", "-Wundef", "-Wmissing-prototypes", "-Wshadow",
|
||||||
"-Wno-switch", "-Wno-parentheses", "-Wpointer-arith",
|
"-Wno-switch", "-Wno-parentheses", "-Wpointer-arith",
|
||||||
"-Wredundant-decls", "-Wno-pointer-sign",
|
"-Wredundant-decls", "-Wno-pointer-sign"]
|
||||||
"-Werror=implicit-function-declaration",
|
__test_and_add_flags__(ctx, ["-Werror=implicit-function-declaration",
|
||||||
"-Wno-error=deprecated-declarations",
|
"-Wno-error=deprecated-declarations",
|
||||||
"-Wno-error=unused-function" ]
|
"-Wno-error=unused-function",
|
||||||
__test_and_add_flags__(ctx, ["-Wempty-body"])
|
"-Wempty-body",
|
||||||
__test_and_add_flags__(ctx, ["-Wdisabled-optimization"])
|
"-Wdisabled-optimization",
|
||||||
__test_and_add_flags__(ctx, ["-Wstrict-prototypes"])
|
"-Wstrict-prototypes",
|
||||||
__test_and_add_flags__(ctx, ["-Wno-format-zero-length"])
|
"-Wno-format-zero-length"])
|
||||||
|
|
||||||
def __add_clang_flags__(ctx):
|
def __add_clang_flags__(ctx):
|
||||||
ctx.env.CFLAGS += ["-Wno-logical-op-parentheses", "-fcolor-diagnostics",
|
ctx.env.CFLAGS += ["-Wno-logical-op-parentheses", "-fcolor-diagnostics",
|
||||||
|
Loading…
Reference in New Issue
Block a user