summaryrefslogtreecommitdiffstats
path: root/waftools
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-14 20:27:24 +0200
committerwm4 <wm4@nowhere>2014-05-14 20:42:04 +0200
commitfe4526195acb4e9e7e421e7b74431d68802e3f8b (patch)
tree43a994358acefb55d1f177ef1006adfd8798e79e /waftools
parentadf20c9775e6d6df5b01f42243f0c5b7f2bbc73d (diff)
downloadmpv-fe4526195acb4e9e7e421e7b74431d68802e3f8b.tar.bz2
mpv-fe4526195acb4e9e7e421e7b74431d68802e3f8b.tar.xz
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.
Diffstat (limited to 'waftools')
-rw-r--r--waftools/detections/compiler.py4
1 files changed, 3 insertions, 1 deletions
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",