build: add checks for some compiler warning flags

This commit is contained in:
wm4 2014-12-14 20:44:27 +01:00
parent aaa319fcbd
commit 91b8a7f994
1 changed files with 8 additions and 8 deletions

View File

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