[asterisk-commits] kpfleming: trunk r107373 - in /trunk: ./ main/ main/editline/ res/ utils/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 11 06:36:52 CDT 2008


Author: kpfleming
Date: Tue Mar 11 06:36:51 2008
New Revision: 107373

URL: http://svn.digium.com/view/asterisk?view=rev&rev=107373
Log:
Merged revisions 107352 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107352 | kpfleming | 2008-03-11 06:04:29 -0500 (Tue, 11 Mar 2008) | 11 lines

fix up various compiler warnings found with gcc-4.3:

- the output of flex includes a static function called 'input' that is not used, so for the moment we'll stop having the compiler tell us about unused variables in the flex source files (a better fix would be to improve our flex post-processing to remove the unused function)

- main/stdtime/localtime.c makes assumptions about signed integer overflow, and gcc-4.3's improved optimizer tries to take advantage of handling potential overflow conditions at compile time; for now, suppress these optimizations until we can fiure out if the code needs improvement

- main/udptl.c has some references to uninitialized variables; in one case there was no bug, but in the other it was certainly possibly for unexpected behavior to occur

- main/editline/readline.c had an unused variable


........

Modified:
    trunk/   (props changed)
    trunk/main/Makefile
    trunk/main/editline/readline.c
    trunk/main/udptl.c
    trunk/res/Makefile
    trunk/utils/Makefile

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/main/Makefile?view=diff&rev=107373&r1=107372&r2=107373
==============================================================================
--- trunk/main/Makefile (original)
+++ trunk/main/Makefile Tue Mar 11 06:36:51 2008
@@ -122,6 +122,8 @@
 	sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' ast_expr2f.c > zz
 	mv zz ast_expr2f.c
 
+ast_expr2f.o: ASTCFLAGS+=-Wno-unused
+
 testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h
 	$(CC) -g -c -Iinclude -DSTANDALONE ast_expr2f.c
 	$(CC) -g -c -Iinclude -DSTANDALONE ast_expr2.c
@@ -129,6 +131,8 @@
 	rm ast_expr2.o ast_expr2f.o 
 
 channel.o: ASTCFLAGS+=$(ZAPTEL_INCLUDE)
+
+stdtime/localtime.o: ASTCFLAGS+=-fno-strict-overflow
 
 AST_EMBED_LDSCRIPTS:=$(sort $(EMBED_LDSCRIPTS))
 AST_EMBED_LDFLAGS:=$(foreach dep,$(EMBED_LDFLAGS),$(value $(dep)))

Modified: trunk/main/editline/readline.c
URL: http://svn.digium.com/view/asterisk/trunk/main/editline/readline.c?view=diff&rev=107373&r1=107372&r2=107373
==============================================================================
--- trunk/main/editline/readline.c (original)
+++ trunk/main/editline/readline.c Tue Mar 11 06:36:51 2008
@@ -1203,7 +1203,6 @@
 	struct dirent *entry;
 	char *temp;
 	size_t len;
-	int count = 0;
 
 	temp = strrchr(text, '/');
 	if (temp) {

Modified: trunk/main/udptl.c
URL: http://svn.digium.com/view/asterisk/trunk/main/udptl.c?view=diff&rev=107373&r1=107372&r2=107373
==============================================================================
--- trunk/main/udptl.c (original)
+++ trunk/main/udptl.c Tue Mar 11 06:36:51 2008
@@ -860,6 +860,7 @@
 
 void ast_udptl_get_peer(struct ast_udptl *udptl, struct sockaddr_in *them)
 {
+	memset(them, 0, sizeof(*them));
 	them->sin_family = AF_INET;
 	them->sin_port = udptl->them.sin_port;
 	them->sin_addr = udptl->them.sin_addr;
@@ -1013,13 +1014,15 @@
 	}
 	if (pr0->set_udptl_peer(c0, p1)) {
 		ast_log(LOG_WARNING, "Channel '%s' failed to talk to '%s'\n", c0->name, c1->name);
+		memset(&ac1, 0, sizeof(ac1));
 	} else {
 		/* Store UDPTL peer */
 		ast_udptl_get_peer(p1, &ac1);
 	}
-	if (pr1->set_udptl_peer(c1, p0))
+	if (pr1->set_udptl_peer(c1, p0)) {
 		ast_log(LOG_WARNING, "Channel '%s' failed to talk back to '%s'\n", c1->name, c0->name);
-	else {
+		memset(&ac0, 0, sizeof(ac0));
+	} else {
 		/* Store UDPTL peer */
 		ast_udptl_get_peer(p0, &ac0);
 	}

Modified: trunk/res/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/res/Makefile?view=diff&rev=107373&r1=107372&r2=107373
==============================================================================
--- trunk/res/Makefile (original)
+++ trunk/res/Makefile Tue Mar 11 06:36:51 2008
@@ -30,7 +30,7 @@
 endif
 
 ael/ael_lex.o: ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h
-ael/ael_lex.o: ASTCFLAGS+=-I. -Iael 
+ael/ael_lex.o: ASTCFLAGS+=-I. -Iael -Wno-unused
 
 ael/ael.tab.o: ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h
 ael/ael.tab.o: ASTCFLAGS+=-I. -Iael -DYYENABLE_NLS=0

Modified: trunk/utils/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/utils/Makefile?view=diff&rev=107373&r1=107372&r2=107373
==============================================================================
--- trunk/utils/Makefile (original)
+++ trunk/utils/Makefile Tue Mar 11 06:36:51 2008
@@ -110,7 +110,7 @@
 ast_expr2f.c: $(ASTTOPDIR)/main/ast_expr2f.c
 	@cp $< $@
 
-ast_expr2f.o: ASTCFLAGS+=-DSTANDALONE_AEL -I$(ASTTOPDIR)/main
+ast_expr2f.o: ASTCFLAGS+=-DSTANDALONE_AEL -I$(ASTTOPDIR)/main -Wno-unused
 
 pval.o : ASTCFLAGS+=-DSTANDALONE
 
@@ -129,7 +129,7 @@
 aelparse.c: $(ASTTOPDIR)/res/ael/ael_lex.c
 	@cp $< $@
 
-aelparse.o: ASTCFLAGS+=-I$(ASTTOPDIR)/res -DSTANDALONE_AEL
+aelparse.o: ASTCFLAGS+=-I$(ASTTOPDIR)/res -DSTANDALONE_AEL -Wno-unused
 
 aelparse: aelparse.o aelbison.o pbx_ael.o hashtab.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o
 




More information about the asterisk-commits mailing list