[asterisk-commits] rizzo: branch 1.4 r72462 - in /branches/1.4: ./ channels/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 28 14:06:00 CDT 2007
Author: rizzo
Date: Thu Jun 28 14:05:59 2007
New Revision: 72462
URL: http://svn.digium.com/view/asterisk?view=rev&rev=72462
Log:
Add -Wdeclaration-after-statement to AST_DEVMODE flags to catch
variable declarations in the middle of a block.
Fix the few instances of the above spotted out by the compiler.
All of this has been already done or is not applicable in trunk,
so the merge of this change will be blocked.
Modified:
branches/1.4/Makefile
branches/1.4/channels/chan_zap.c
branches/1.4/main/say.c
Modified: branches/1.4/Makefile
URL: http://svn.digium.com/view/asterisk/branches/1.4/Makefile?view=diff&rev=72462&r1=72461&r2=72462
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Thu Jun 28 14:05:59 2007
@@ -192,7 +192,7 @@
ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h
ifeq ($(AST_DEVMODE),yes)
- ASTCFLAGS+=-Werror -Wunused
+ ASTCFLAGS+=-Werror -Wunused -Wdeclaration-after-statement
endif
ifneq ($(findstring BSD,$(OSARCH)),)
Modified: branches/1.4/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_zap.c?view=diff&rev=72462&r1=72461&r2=72462
==============================================================================
--- branches/1.4/channels/chan_zap.c (original)
+++ branches/1.4/channels/chan_zap.c Thu Jun 28 14:05:59 2007
@@ -10491,9 +10491,10 @@
|| !strcasecmp(v->name, "crv")
#endif
) {
+ int iscrv;
if (skipchannels)
continue;
- int iscrv = !strcasecmp(v->name, "crv");
+ iscrv = !strcasecmp(v->name, "crv");
if (build_channels(*confp, iscrv, v->value, reload, v->lineno, &found_pseudo))
return -1;
} else if (!strcasecmp(v->name, "zapchan")) {
Modified: branches/1.4/main/say.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/say.c?view=diff&rev=72462&r1=72461&r2=72462
==============================================================================
--- branches/1.4/main/say.c (original)
+++ branches/1.4/main/say.c Thu Jun 28 14:05:59 2007
@@ -6729,6 +6729,9 @@
{
int res = 0;
char fn[512] = "";
+ char* s = 0;
+ const char* remainder = fn;
+
if (!num)
return ast_say_digits_full(chan, 0, ints, language, audiofd, ctrlfd);
@@ -6736,8 +6739,6 @@
ast_translate_number_ge(num, fn, 512);
- char* s = 0;
- const char* remainder = fn;
while (res == 0 && (s = strstr(remainder, " "))) {
size_t len = s - remainder;
More information about the asterisk-commits
mailing list