From fe4526195acb4e9e7e421e7b74431d68802e3f8b Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 14 May 2014 20:27:24 +0200 Subject: build: add some warning cflags These were in the old configure script too. Two flags are explicitly tested, because I have no idea how widespread support for them is, and testing them is just easier than trying to look them up in various gcc/clang manuals. There are people using gcc 4.2 out there, so some caution is warranted. --- waftools/detections/compiler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'waftools') diff --git a/waftools/detections/compiler.py b/waftools/detections/compiler.py index 670a7b7fbc..ad1f843f35 100644 --- a/waftools/detections/compiler.py +++ b/waftools/detections/compiler.py @@ -26,13 +26,15 @@ def __add_generic_flags__(ctx): ctx.env.CFLAGS += ['-g'] def __add_gcc_flags__(ctx): - ctx.env.CFLAGS += ["-Wundef", "-Wmissing-prototypes", + ctx.env.CFLAGS += ["-Wall", "-Wundef", "-Wmissing-prototypes", "-Wshadow", "-Wno-switch", "-Wno-parentheses", "-Wpointer-arith", "-Wredundant-decls", "-Wno-pointer-sign", "-Werror=implicit-function-declaration", "-Wno-error=deprecated-declarations", "-Wno-error=unused-function" ] __test_and_add_flags__(ctx, ["-Wempty-body"]) + __test_and_add_flags__(ctx, ["-Wdisabled-optimization"]) + __test_and_add_flags__(ctx, ["-Wstrict-prototypes"]) def __add_clang_flags__(ctx): ctx.env.CFLAGS += ["-Wno-logical-op-parentheses", "-fcolor-diagnostics", -- cgit v1.2.3