[asterisk-commits] trunk r10842 - in /trunk: Makefile pbx/pbx_dundi.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Feb 22 21:38:38 MST 2006


Author: markster
Date: Wed Feb 22 22:38:38 2006
New Revision: 10842

URL: http://svn.digium.com/view/asterisk?rev=10842&view=rev
Log:
Fix a few compile warnings (turned errors) and disable -Werror on the 
normal build.  If people want this they can turn it on, and don't anyone 
turn it on by default until you fix building on GCC 4.x

Modified:
    trunk/Makefile
    trunk/pbx/pbx_dundi.c

Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/Makefile?rev=10842&r1=10841&r2=10842&view=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Wed Feb 22 22:38:38 2006
@@ -233,7 +233,7 @@
 INCLUDE+=-Iinclude -I../include
 ASTCFLAGS+=-pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
 ASTCFLAGS+=$(OPTIMIZE)
-ASTCFLAGS+= -Werror -Wunused
+ASTCFLAGS+=# -Werror -Wunused
 ifeq ($(shell gcc -v 2>&1 | grep 'gcc version' | cut -f3 -d' ' | cut -f1 -d.),4)
 ASTCFLAGS+= -Wno-pointer-sign
 endif

Modified: trunk/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_dundi.c?rev=10842&r1=10841&r2=10842&view=diff
==============================================================================
--- trunk/pbx/pbx_dundi.c (original)
+++ trunk/pbx/pbx_dundi.c Wed Feb 22 22:38:38 2006
@@ -1132,10 +1132,12 @@
 	int expiration;
 	char fs[256];
 	time_t timeout;
+	unsigned int x;
 	/* Build request string */
 	if (!ast_db_get("dundi/cache", key, data, sizeof(data))) {
 		ptr = data;
-		if (sscanf(ptr, "%d|%n", (int *)&timeout, &length) == 1) {
+		if (sscanf(ptr, "%d|%n", (int *)&x, &length) == 1) {
+			timeout = x;
 			expiration = timeout - now;
 			if (expiration > 0) {
 				ast_log(LOG_DEBUG, "Found cache expiring in %d seconds!\n", (int)(timeout - now));
@@ -2028,9 +2030,11 @@
 	char *last=NULL;
 	char tmp[256];
 	time_t expired;
+	unsigned int x;
 	
 	ast_db_get(secretpath, "secretexpiry", tmp, sizeof(tmp));
-	if (sscanf(tmp, "%d", (int *)&expired) == 1) {
+	if (sscanf(tmp, "%d", (int *)&x) == 1) {
+		expired = x;
 		ast_db_get(secretpath, "secret", tmp, sizeof(tmp));
 		current = strchr(tmp, ';');
 		if (!current)



More information about the asterisk-commits mailing list