Fix various compiler warnings (bug #322)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1570 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
9f2fba7fb1
commit
9870b2521b
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
|
4
cli.c
4
cli.c
|
@ -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)"));
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
/*
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#endif
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Reference in New Issue