[asterisk-dev] suggestion - add -Wdeclaration-after-statement to AST_DEVMODE builds

Luigi Rizzo rizzo at icir.org
Sun Jun 24 16:10:04 CDT 2007


I'd like to suggest the following patch to the top level asterisk Makefile:

Index: Makefile
===================================================================
--- Makefile    (revision 71337)
+++ Makefile    (working copy)
@@ -193,6 +193,6 @@
 ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h
 
 ifeq ($(AST_DEVMODE),yes)
-  ASTCFLAGS+=-Werror -Wunused -Wundef
+  ASTCFLAGS+=-Werror -Wunused -Wundef  -Wdeclaration-after-statement
 endif

so that declarations in the middle of a block are detected
in AST_DEVMODE builds. There are a few instances of it
(chan_sip.c, chan_skinny.c, app_minivm.c, app_sms.c amongh the
modules i can compile myself) and this change helps catching
them earlier.

objections ? this is only for trunk and 1.4

	cheers
	luigi



More information about the asterisk-dev mailing list