diff options
-rwxr-xr-x | apps/app_queue.c | 2 | ||||
-rwxr-xr-x | channels/chan_zap.c | 4 | ||||
-rwxr-xr-x | cli.c | 4 | ||||
-rwxr-xr-x | codecs/codec_g723_1.c | 10 | ||||
-rwxr-xr-x | codecs/gsm/Makefile | 4 | ||||
-rwxr-xr-x | codecs/lpc10/synths.c | 30 | ||||
-rwxr-xr-x | codecs/mp3/Makefile | 2 | ||||
-rwxr-xr-x | res/res_musiconhold.c | 1 | ||||
-rwxr-xr-x | stdtime/localtime.c | 8 |
9 files changed, 39 insertions, 26 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 17feca7ac..1c3ab73b2 100755 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1384,7 +1384,7 @@ static int queues_show(int fd, int argc, char **argv) ast_cli(fd, " Callers: \n"); for (qe = q->head; qe; qe = qe->next) ast_cli(fd, " %d. %s (wait: %ld:%2.2ld)\n", pos++, qe->chan->name, - (now - qe->start) / 60, (now - qe->start) % 60); + (long)(now - qe->start) / 60, (long)(now - qe->start) % 60); } else ast_cli(fd, " No Callers\n"); ast_cli(fd, "\n"); diff --git a/channels/chan_zap.c b/channels/chan_zap.c index d05a19e80..fb37ea65d 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -6372,7 +6372,7 @@ static int handle_r2_no_debug(int fd, int argc, char *argv[]) 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 @@ static int handle_r2_debug(int fd, int argc, char *argv[]) } 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; @@ -487,7 +487,7 @@ static int handle_showchan(int fd, int argc, char *argv[]) "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 @@ static int handle_showchan(int fd, int argc, char *argv[]) (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)")); diff --git a/codecs/codec_g723_1.c b/codecs/codec_g723_1.c index 423d24695..3e96ad65f 100755 --- a/codecs/codec_g723_1.c +++ b/codecs/codec_g723_1.c @@ -94,7 +94,7 @@ struct g723_decoder_pvt { 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 @@ static struct ast_translator_pvt *g723tolin_new() 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 @@ static struct ast_frame *lintog723_sample() 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 @@ static struct ast_frame *g723tolin_sample() 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 @@ int usecount(void) return res; } -char *key() +char *key(void) { return ASTERISK_GPL_KEY; } diff --git a/codecs/gsm/Makefile b/codecs/gsm/Makefile index e41c397b5..5e2ccd180 100755 --- a/codecs/gsm/Makefile +++ b/codecs/gsm/Makefile @@ -54,8 +54,8 @@ PG = # 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) diff --git a/codecs/lpc10/synths.c b/codecs/lpc10/synths.c index 33becea65..369e6d662 100755 --- a/codecs/lpc10/synths.c +++ b/codecs/lpc10/synths.c @@ -1,8 +1,11 @@ /* $Log$ -Revision 1.14 2003/02/12 13:59:15 matteo -mer feb 12 14:56:57 CET 2003 +Revision 1.15 2003/09/27 02:45:37 markster +Fix various compiler warnings (bug #322) + +Revision 1.2 2003/09/27 02:45:37 markster +Fix various compiler warnings (bug #322) Revision 1.1.1.1 2003/02/12 13:59:15 matteo mer feb 12 14:56:57 CET 2003 @@ -61,9 +64,12 @@ static real c_b2 = .7f; /* SYNTHS Version 54 */ /* $Log$ - * Revision 1.14 2003/02/12 13:59:15 matteo - * mer feb 12 14:56:57 CET 2003 + * Revision 1.15 2003/09/27 02:45:37 markster + * Fix various compiler warnings (bug #322) * +/* Revision 1.2 2003/09/27 02:45:37 markster +/* Fix various compiler warnings (bug #322) +/* /* Revision 1.1.1.1 2003/02/12 13:59:15 matteo /* mer feb 12 14:56:57 CET 2003 /* @@ -173,7 +179,7 @@ static real c_b2 = .7f; 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; @@ -184,9 +190,12 @@ static real c_b2 = .7f; real rci[160] /* was [10][16] */; /* $Log$ - * Revision 1.14 2003/02/12 13:59:15 matteo - * mer feb 12 14:56:57 CET 2003 + * Revision 1.15 2003/09/27 02:45:37 markster + * Fix various compiler warnings (bug #322) * +/* Revision 1.2 2003/09/27 02:45:37 markster +/* Fix various compiler warnings (bug #322) +/* /* Revision 1.1.1.1 2003/02/12 13:59:15 matteo /* mer feb 12 14:56:57 CET 2003 /* @@ -218,9 +227,12 @@ static real c_b2 = .7f; /* Frame size, Prediction order, Pitch period */ /* Arguments */ /* $Log$ - * Revision 1.14 2003/02/12 13:59:15 matteo - * mer feb 12 14:56:57 CET 2003 + * Revision 1.15 2003/09/27 02:45:37 markster + * Fix various compiler warnings (bug #322) * +/* Revision 1.2 2003/09/27 02:45:37 markster +/* Fix various compiler warnings (bug #322) +/* /* Revision 1.1.1.1 2003/02/12 13:59:15 matteo /* mer feb 12 14:56:57 CET 2003 /* diff --git a/codecs/mp3/Makefile b/codecs/mp3/Makefile index e8a771fca..f3b0c4c1a 100755 --- a/codecs/mp3/Makefile +++ b/codecs/mp3/Makefile @@ -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=$(PROC) -funroll-loops -Wall -Wno-missing-prototypes -Wno-missing-declarations -g -fPIC RANLIB=ranlib # the XING decoder objs and dependencies: diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 3dccd4eb3..5ca4f5fbe 100755 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -40,7 +40,6 @@ #endif #include <unistd.h> #include <sys/ioctl.h> -#include <sys/wait.h> #include <pthread.h> diff --git a/stdtime/localtime.c b/stdtime/localtime.c index 276eb9f97..84ea38f6b 100755 --- a/stdtime/localtime.c +++ b/stdtime/localtime.c @@ -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 @@ static char elsieid[] = "@(#)localtime.c 7.57"; #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 @@ ast_tzset P((const char *name)) 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 @@ ast_tzset P((const char *name)) /* 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; |