Index: cli.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cli.c,v
retrieving revision 1.9
diff -u -r1.9 cli.c
--- cli.c	13 Aug 2003 15:25:16 -0000	1.9
+++ cli.c	27 Sep 2003 00:43:31 -0000
@@ -487,7 +487,7 @@
 	"1st File Descriptor: %d\n"
 	"      Frames in: %d%s\n"
 	"     Frames out: %d%s\n"
-	" Time to Hangup: %d\n"
+	" Time to Hangup: %ld\n"
 	" --   PBX   --\n"
 	"        Context: %s\n"
 	"      Extension: %s\n"
@@ -502,7 +502,7 @@
 	(c->callerid ? c->callerid : "(N/A)"),
 	(c->dnid ? c->dnid : "(N/A)" ), ast_state2str(c->_state), c->_state, c->rings, c->nativeformats, c->writeformat, c->readformat,
 	c->fds[0], c->fin & 0x7fffffff, (c->fin & 0x80000000) ? " (DEBUGGED)" : "",
-	c->fout & 0x7fffffff, (c->fout & 0x80000000) ? " (DEBUGGED)" : "", c->whentohangup,
+	c->fout & 0x7fffffff, (c->fout & 0x80000000) ? " (DEBUGGED)" : "", (long)c->whentohangup,
 	c->context, c->exten, c->priority, c->callgroup, c->pickupgroup, ( c->appl ? c->appl : "(N/A)" ),
 	( c-> data ? (strlen(c->data) ? c->data : "(Empty)") : "(None)"),
 	c->stack, (c->blocking ? c->blockproc : "(Not Blocking)"));
Index: apps/app_queue.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v
retrieving revision 1.35
diff -u -r1.35 app_queue.c
--- apps/app_queue.c	10 Sep 2003 05:24:49 -0000	1.35
+++ apps/app_queue.c	27 Sep 2003 00:43:32 -0000
@@ -1383,8 +1383,8 @@
 			pos = 1;
 			ast_cli(fd, "   Callers: \n");
 			for (qe = q->head; qe; qe = qe->next) 
-				ast_cli(fd, "      %d. %s (wait: %d:%2.2d)\n", pos++, qe->chan->name,
-								(now - qe->start) / 60, (now - qe->start) % 60);
+				ast_cli(fd, "      %d. %s (wait: %ld:%2.2ld)\n", pos++, qe->chan->name,
+								(long)(now - qe->start) / 60, (long)(now - qe->start) % 60);
 		} else
 			ast_cli(fd, "   No Callers\n");
 		ast_cli(fd, "\n");
Index: channels/chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.104
diff -u -r1.104 chan_zap.c
--- channels/chan_zap.c	26 Sep 2003 22:31:19 -0000	1.104
+++ channels/chan_zap.c	27 Sep 2003 00:43:41 -0000
@@ -6372,7 +6372,7 @@
 		return RESULT_SHOWUSAGE;
 	chan = atoi(argv[4]);
 	if ((chan < 1) || (chan > NUM_SPANS)) {
-		ast_cli(fd, "Invalid channel %s.  Should be a number greater than 0\n");
+		ast_cli(fd, "Invalid channel %s.  Should be a number greater than 0\n", argv[4]);
 		return RESULT_SUCCESS;
 	}
 	tmp = iflist;
@@ -6403,7 +6403,7 @@
 	}
 	chan = atoi(argv[3]);
 	if ((chan < 1) || (chan > NUM_SPANS)) {
-		ast_cli(fd, "Invalid channel %s.  Should be a number greater than 0\n");
+		ast_cli(fd, "Invalid channel %s.  Should be a number greater than 0\n", argv[3]);
 		return RESULT_SUCCESS;
 	}
 	tmp = iflist;
Index: codecs/codec_g723_1.c
===================================================================
RCS file: /usr/cvsroot/asterisk/codecs/codec_g723_1.c,v
retrieving revision 1.4
diff -u -r1.4 codec_g723_1.c
--- codecs/codec_g723_1.c	13 Aug 2003 15:25:16 -0000	1.4
+++ codecs/codec_g723_1.c	27 Sep 2003 00:43:42 -0000
@@ -94,7 +94,7 @@
 	int tail;
 };
 
-static struct ast_translator_pvt *g723tolin_new()
+static struct ast_translator_pvt *g723tolin_new(void)
 {
 	struct g723_decoder_pvt *tmp;
 	tmp = malloc(sizeof(struct g723_decoder_pvt));
@@ -108,7 +108,7 @@
 	return (struct ast_translator_pvt *)tmp;
 }
 
-static struct ast_frame *lintog723_sample()
+static struct ast_frame *lintog723_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
@@ -123,7 +123,7 @@
 	return &f;
 }
 
-static struct ast_frame *g723tolin_sample()
+static struct ast_frame *g723tolin_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
@@ -138,7 +138,7 @@
 	return &f;
 }
 
-static struct ast_translator_pvt *lintog723_new()
+static struct ast_translator_pvt *lintog723_new(void)
 {
 	struct g723_encoder_pvt *tmp;
 	tmp = malloc(sizeof(struct g723_encoder_pvt));
@@ -396,7 +396,7 @@
 	return res;
 }
 
-char *key()
+char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
Index: codecs/gsm/Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/codecs/gsm/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- codecs/gsm/Makefile	19 Sep 2003 01:20:22 -0000	1.4
+++ codecs/gsm/Makefile	27 Sep 2003 00:43:43 -0000
@@ -54,8 +54,8 @@
 # CC		= /usr/lang/acc
 # CCFLAGS 	= -c -O
 
-CC		= gcc -pipe -Wall $(OPTIMIZE) -march=$(PROC) -fschedule-insns2  -fomit-frame-pointer 
-CCFLAGS 	+= -c -DNeedFunctionPrototypes=1 -finline-functions -funroll-loops -fPIC
+CC		= gcc $(OPTIMIZE) -march=$(PROC) -fomit-frame-pointer 
+CCFLAGS 	+= -c -DNeedFunctionPrototypes=1 -funroll-loops -fPIC
 
 LD 		= $(CC)
 
Index: codecs/lpc10/synths.c
===================================================================
RCS file: /usr/cvsroot/asterisk/codecs/lpc10/synths.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 synths.c
--- codecs/lpc10/synths.c	12 Feb 2003 13:59:15 -0000	1.1.1.1
+++ codecs/lpc10/synths.c	27 Sep 2003 00:43:43 -0000
@@ -167,7 +167,7 @@
     extern /* Subroutine */ int deemp_(real *, integer *, struct lpc10_decoder_state *);
     real ratio;
     integer ipiti[16];
-    extern /* Subroutine */ bsynz_(real *, integer *, 
+    extern /* Subroutine */ void bsynz_(real *, integer *, 
 	    integer *, real *, real *, real *, real *, struct lpc10_decoder_state *), irc2pc_(real *, real *
 	    , integer *, real *, real *);
     real g2pass;
Index: codecs/mp3/Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/codecs/mp3/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- codecs/mp3/Makefile	27 Apr 2003 18:13:11 -0000	1.2
+++ codecs/mp3/Makefile	27 Sep 2003 00:43:43 -0000
@@ -1,7 +1,7 @@
 #
 # LMC section
 
-CFLAGS+= -I../include -Iinclude -O6 -funroll-loops -finline-functions -Wall -Wno-missing-prototypes -Wno-missing-declarations -g -fPIC
+CFLAGS+= -I../include -Iinclude -O3 -march=$(shell uname -m) -funroll-loops -Wall -Wno-missing-prototypes -Wno-missing-declarations -g -fPIC
 RANLIB=ranlib
 
 # the XING decoder objs and dependencies:
Index: res/res_musiconhold.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_musiconhold.c,v
retrieving revision 1.9
diff -u -r1.9 res_musiconhold.c
--- res/res_musiconhold.c	16 Sep 2003 19:35:57 -0000	1.9
+++ res/res_musiconhold.c	27 Sep 2003 00:43:45 -0000
@@ -40,7 +40,6 @@
 #endif
 #include <unistd.h>
 #include <sys/ioctl.h>
-#include <sys/wait.h>
 
 #include <pthread.h>
 
Index: stdtime/localtime.c
===================================================================
RCS file: /usr/cvsroot/asterisk/stdtime/localtime.c,v
retrieving revision 1.3
diff -u -r1.3 localtime.c
--- stdtime/localtime.c	21 Sep 2003 15:23:54 -0000	1.3
+++ stdtime/localtime.c	27 Sep 2003 00:43:45 -0000
@@ -25,11 +25,12 @@
 #define TZ_STRLEN_MAX	255
 /* #define DEBUG */
 #include <asterisk/lock.h>
+#include <asterisk/localtime.h>
 
 
 #ifndef lint
 #ifndef NOID
-static char	elsieid[] = "@(#)localtime.c	7.57";
+static const char	elsieid[] = "@(#)localtime.c	7.57";
 #endif /* !defined NOID */
 #endif /* !defined lint */
 
@@ -45,7 +46,7 @@
 #include <sys/stat.h>
 #include "private.h"
 #include "tzfile.h"
-#include "fcntl.h"
+#include <fcntl.h>
 #ifdef DEBUG
 #include <stdio.h>
 #endif
@@ -929,7 +930,7 @@
 		cur_state->ttis[0].tt_gmtoff = 0;
 		cur_state->ttis[0].tt_abbrind = 0;
 		(void) strcpy(cur_state->chars, gmt);
-	} else if (tzload(name, cur_state) != 0)
+	} else if (tzload(name, cur_state) != 0) {
 		if (name[0] == ':') {
 			(void) gmtload(cur_state);
 		} else if (tzparse(name, cur_state, FALSE) != 0) {
@@ -938,6 +939,7 @@
 				/* Last ditch, get GMT */
 				(void) gmtload(cur_state);
 		}
+	}
 	strncpy(cur_state->name,name,sizeof(cur_state->name));
 	if (last_lclptr)
 		last_lclptr->next = cur_state;
