Fix a few compile warnings (turned errors) and disable -Werror on the
authorMark Spencer <markster@digium.com>
Thu, 23 Feb 2006 04:38:38 +0000 (04:38 +0000)
committerMark Spencer <markster@digium.com>
Thu, 23 Feb 2006 04:38:38 +0000 (04:38 +0000)
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10842 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile
pbx/pbx_dundi.c

index 27529e0..7ac1f4f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -233,7 +233,7 @@ endif
 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)
 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
 ifeq ($(shell gcc -v 2>&1 | grep 'gcc version' | cut -f3 -d' ' | cut -f1 -d.),4)
 ASTCFLAGS+= -Wno-pointer-sign
 endif
index 1bafab2..9d842c6 100644 (file)
@@ -1132,10 +1132,12 @@ static int cache_lookup_internal(time_t now, struct dundi_request *req, char *ke
        int expiration;
        char fs[256];
        time_t timeout;
        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;
        /* 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));
                        expiration = timeout - now;
                        if (expiration > 0) {
                                ast_log(LOG_DEBUG, "Found cache expiring in %d seconds!\n", (int)(timeout - now));
@@ -2028,9 +2030,11 @@ static void load_password(void)
        char *last=NULL;
        char tmp[256];
        time_t expired;
        char *last=NULL;
        char tmp[256];
        time_t expired;
+       unsigned int x;
        
        ast_db_get(secretpath, "secretexpiry", tmp, sizeof(tmp));
        
        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)
                ast_db_get(secretpath, "secret", tmp, sizeof(tmp));
                current = strchr(tmp, ';');
                if (!current)