[asterisk-commits] seanbright: branch seanbright/resolve-shadow-warnings r114292 - in /team/sean...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 18 18:22:49 CDT 2008


Author: seanbright
Date: Fri Apr 18 18:22:48 2008
New Revision: 114292

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114292
Log:
Configure and Makefile mojo to turn -Wshadow on under dev mode

Modified:
    team/seanbright/resolve-shadow-warnings/Makefile
    team/seanbright/resolve-shadow-warnings/configure
    team/seanbright/resolve-shadow-warnings/configure.ac
    team/seanbright/resolve-shadow-warnings/include/asterisk/autoconfig.h.in
    team/seanbright/resolve-shadow-warnings/makeopts.in

Modified: team/seanbright/resolve-shadow-warnings/Makefile
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/Makefile?view=diff&rev=114292&r1=114291&r2=114292
==============================================================================
--- team/seanbright/resolve-shadow-warnings/Makefile (original)
+++ team/seanbright/resolve-shadow-warnings/Makefile Fri Apr 18 18:22:48 2008
@@ -229,7 +229,7 @@
 ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h
 
 ifeq ($(AST_DEVMODE),yes)
-  ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT) -Wmissing-format-attribute -Wformat-security #-Wformat=2
+  ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT) $(AST_SHADOW_WARNINGS) -Wmissing-format-attribute -Wformat-security #-Wformat=2
 endif
 
 ifneq ($(findstring BSD,$(OSARCH)),)

Modified: team/seanbright/resolve-shadow-warnings/configure.ac
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/configure.ac?view=diff&rev=114292&r1=114291&r2=114292
==============================================================================
--- team/seanbright/resolve-shadow-warnings/configure.ac (original)
+++ team/seanbright/resolve-shadow-warnings/configure.ac Fri Apr 18 18:22:48 2008
@@ -473,13 +473,22 @@
 
 AC_MSG_CHECKING(for -fno-strict-overflow)
 if $(${CC} -O2 -fno-strict-overflow -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
-   AC_MSG_RESULT(yes)
-   AST_NO_STRICT_OVERFLOW=-fno-strict-overflow
+	AC_MSG_RESULT(yes)
+	AST_NO_STRICT_OVERFLOW=-fno-strict-overflow
 else
 	AC_MSG_RESULT(no)
 	AST_NO_STRICT_OVERFLOW=
 fi
 AC_SUBST(AST_NO_STRICT_OVERFLOW)
+
+AC_MSG_CHECKING(for -Wshadow)
+if $(${CC} -Wshadow -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
+	AC_MSG_RESULT(yes)
+	AST_SHADOW_WARNINGS=-Wshadow
+else
+	AST_SHADOW_WARNINGS=
+fi
+AC_SUBST(AST_SHADOW_WARNINGS)
 
 AC_MSG_CHECKING(for sysinfo)
 AC_LINK_IFELSE(

Modified: team/seanbright/resolve-shadow-warnings/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/include/asterisk/autoconfig.h.in?view=diff&rev=114292&r1=114291&r2=114292
==============================================================================
--- team/seanbright/resolve-shadow-warnings/include/asterisk/autoconfig.h.in (original)
+++ team/seanbright/resolve-shadow-warnings/include/asterisk/autoconfig.h.in Fri Apr 18 18:22:48 2008
@@ -1178,9 +1178,6 @@
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
 #endif
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif
 
 /* Define like PROTOTYPES; this can be used by system headers. */
 #undef __PROTOTYPES

Modified: team/seanbright/resolve-shadow-warnings/makeopts.in
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/makeopts.in?view=diff&rev=114292&r1=114291&r2=114292
==============================================================================
--- team/seanbright/resolve-shadow-warnings/makeopts.in (original)
+++ team/seanbright/resolve-shadow-warnings/makeopts.in Fri Apr 18 18:22:48 2008
@@ -65,6 +65,7 @@
 
 AST_DECLARATION_AFTER_STATEMENT=@AST_DECLARATION_AFTER_STATEMENT@
 AST_NO_STRICT_OVERFLOW=@AST_NO_STRICT_OVERFLOW@
+AST_SHADOW_WARNINGS=@AST_SHADOW_WARNINGS@
 
 ASOUND_INCLUDE=@ALSA_INCLUDE@
 ASOUND_LIB=@ALSA_LIB@




More information about the asterisk-commits mailing list