[svn-commits] seanbright: trunk r358622 - /trunk/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Mar 8 10:21:54 CST 2012
Author: seanbright
Date: Thu Mar 8 10:21:49 2012
New Revision: 358622
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=358622
Log:
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.
Modified:
trunk/Makefile
trunk/configure
trunk/configure.ac
trunk/makeopts.in
Modified: trunk/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/Makefile?view=diff&rev=358622&r1=358621&r2=358622
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Thu Mar 8 10:21:49 2012
@@ -72,6 +72,7 @@
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 @@
_ASTCFLAGS+=-Wundef
_ASTCFLAGS+=-Wmissing-format-attribute
_ASTCFLAGS+=-Wformat=2
+ ifeq ($(AST_DEVMODE_STRICT),yes)
+ _ASTCFLAGS+=-Wshadow
+ endif
ADDL_TARGETS+=validate-docs
endif
Modified: trunk/configure.ac
URL: http://svnview.digium.com/svn/asterisk/trunk/configure.ac?view=diff&rev=358622&r1=358621&r2=358622
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Thu Mar 8 10:21:49 2012
@@ -343,10 +343,15 @@
AST_DEVMODE=yes
NOISY_BUILD=yes
;;
+ strict)
+ AST_DEVMODE=yes
+ AST_DEVMODE_STRICT=yes
+ ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-dev-mode) ;;
esac])
AC_SUBST(NOISY_BUILD)
AC_SUBST(AST_DEVMODE)
+AC_SUBST(AST_DEVMODE_STRICT)
AST_CODE_COVERAGE=no
AC_ARG_ENABLE([coverage],
Modified: trunk/makeopts.in
URL: http://svnview.digium.com/svn/asterisk/trunk/makeopts.in?view=diff&rev=358622&r1=358621&r2=358622
==============================================================================
--- trunk/makeopts.in (original)
+++ trunk/makeopts.in Thu Mar 8 10:21:49 2012
@@ -94,6 +94,7 @@
ASTVARRUNDIR = @astvarrundir@
AST_DEVMODE=@AST_DEVMODE@
+AST_DEVMODE_STRICT=@AST_DEVMODE_STRICT@
NOISY_BUILD=@NOISY_BUILD@
AST_CODE_COVERAGE=@AST_CODE_COVERAGE@
More information about the svn-commits
mailing list