diff options
author | Sean Bright <sean@malleable.com> | 2012-03-08 16:21:49 +0000 |
---|---|---|
committer | Sean Bright <sean@malleable.com> | 2012-03-08 16:21:49 +0000 |
commit | 2969b00468bf6f04e44f96e8fcf611526afdeec4 (patch) | |
tree | 681b3e40c0e77b70491f3b364c2e933073a1af14 /Makefile | |
parent | ced8b052e10382ac11fa22b732ed11f941438d7d (diff) |
Add --enable-dev-mode=strict to configure.
Passing -Wshadow to gcc enables shadow warnings. From the gcc manual:
Warn whenever a local variable or type declaration shadows another
variable, parameter, type, or class member (in C++), or whenever a
built-in function is shadowed.
Asterisk will not currently compile with this option set, but a number of bugs
have been discovered by enabling this flag on specific files. The long-term
goal is to eliminate all of the suspect code that causes this warning to be
emitted.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -72,6 +72,7 @@ export NOISY_BUILD # Used in Makefile.rules export MENUSELECT_CFLAGS # Options selected in menuselect. export AST_DEVMODE # Set to "yes" for additional compiler # and runtime checks +export AST_DEVMODE_STRICT # Enables shadow warnings (-Wshadow) export _SOLINK # linker flags for all shared objects export SOLINK # linker flags for loadable modules @@ -224,6 +225,9 @@ ifeq ($(AST_DEVMODE),yes) _ASTCFLAGS+=-Wundef _ASTCFLAGS+=-Wmissing-format-attribute _ASTCFLAGS+=-Wformat=2 + ifeq ($(AST_DEVMODE_STRICT),yes) + _ASTCFLAGS+=-Wshadow + endif ADDL_TARGETS+=validate-docs endif |