mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 00:24:05 +00:00
Fix various compiler warnings (bug #322)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1384,7 +1384,7 @@ static int queues_show(int fd, int argc, char **argv)
|
|||||||
ast_cli(fd, " Callers: \n");
|
ast_cli(fd, " Callers: \n");
|
||||||
for (qe = q->head; qe; qe = qe->next)
|
for (qe = q->head; qe; qe = qe->next)
|
||||||
ast_cli(fd, " %d. %s (wait: %ld:%2.2ld)\n", pos++, qe->chan->name,
|
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
|
} else
|
||||||
ast_cli(fd, " No Callers\n");
|
ast_cli(fd, " No Callers\n");
|
||||||
ast_cli(fd, "\n");
|
ast_cli(fd, "\n");
|
||||||
|
@@ -6372,7 +6372,7 @@ static int handle_r2_no_debug(int fd, int argc, char *argv[])
|
|||||||
return RESULT_SHOWUSAGE;
|
return RESULT_SHOWUSAGE;
|
||||||
chan = atoi(argv[4]);
|
chan = atoi(argv[4]);
|
||||||
if ((chan < 1) || (chan > NUM_SPANS)) {
|
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;
|
return RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
tmp = iflist;
|
tmp = iflist;
|
||||||
@@ -6403,7 +6403,7 @@ static int handle_r2_debug(int fd, int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
chan = atoi(argv[3]);
|
chan = atoi(argv[3]);
|
||||||
if ((chan < 1) || (chan > NUM_SPANS)) {
|
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;
|
return RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
tmp = iflist;
|
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"
|
"1st File Descriptor: %d\n"
|
||||||
" Frames in: %d%s\n"
|
" Frames in: %d%s\n"
|
||||||
" Frames out: %d%s\n"
|
" Frames out: %d%s\n"
|
||||||
" Time to Hangup: %d\n"
|
" Time to Hangup: %ld\n"
|
||||||
" -- PBX --\n"
|
" -- PBX --\n"
|
||||||
" Context: %s\n"
|
" Context: %s\n"
|
||||||
" Extension: %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->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->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->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->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-> data ? (strlen(c->data) ? c->data : "(Empty)") : "(None)"),
|
||||||
c->stack, (c->blocking ? c->blockproc : "(Not Blocking)"));
|
c->stack, (c->blocking ? c->blockproc : "(Not Blocking)"));
|
||||||
|
@@ -94,7 +94,7 @@ struct g723_decoder_pvt {
|
|||||||
int tail;
|
int tail;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ast_translator_pvt *g723tolin_new()
|
static struct ast_translator_pvt *g723tolin_new(void)
|
||||||
{
|
{
|
||||||
struct g723_decoder_pvt *tmp;
|
struct g723_decoder_pvt *tmp;
|
||||||
tmp = malloc(sizeof(struct g723_decoder_pvt));
|
tmp = malloc(sizeof(struct g723_decoder_pvt));
|
||||||
@@ -108,7 +108,7 @@ static struct ast_translator_pvt *g723tolin_new()
|
|||||||
return (struct ast_translator_pvt *)tmp;
|
return (struct ast_translator_pvt *)tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct ast_frame *lintog723_sample()
|
static struct ast_frame *lintog723_sample(void)
|
||||||
{
|
{
|
||||||
static struct ast_frame f;
|
static struct ast_frame f;
|
||||||
f.frametype = AST_FRAME_VOICE;
|
f.frametype = AST_FRAME_VOICE;
|
||||||
@@ -123,7 +123,7 @@ static struct ast_frame *lintog723_sample()
|
|||||||
return &f;
|
return &f;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct ast_frame *g723tolin_sample()
|
static struct ast_frame *g723tolin_sample(void)
|
||||||
{
|
{
|
||||||
static struct ast_frame f;
|
static struct ast_frame f;
|
||||||
f.frametype = AST_FRAME_VOICE;
|
f.frametype = AST_FRAME_VOICE;
|
||||||
@@ -138,7 +138,7 @@ static struct ast_frame *g723tolin_sample()
|
|||||||
return &f;
|
return &f;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct ast_translator_pvt *lintog723_new()
|
static struct ast_translator_pvt *lintog723_new(void)
|
||||||
{
|
{
|
||||||
struct g723_encoder_pvt *tmp;
|
struct g723_encoder_pvt *tmp;
|
||||||
tmp = malloc(sizeof(struct g723_encoder_pvt));
|
tmp = malloc(sizeof(struct g723_encoder_pvt));
|
||||||
@@ -396,7 +396,7 @@ int usecount(void)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *key()
|
char *key(void)
|
||||||
{
|
{
|
||||||
return ASTERISK_GPL_KEY;
|
return ASTERISK_GPL_KEY;
|
||||||
}
|
}
|
||||||
|
@@ -54,8 +54,8 @@ PG =
|
|||||||
# CC = /usr/lang/acc
|
# CC = /usr/lang/acc
|
||||||
# CCFLAGS = -c -O
|
# CCFLAGS = -c -O
|
||||||
|
|
||||||
CC = gcc -pipe -Wall $(OPTIMIZE) -march=$(PROC) -fschedule-insns2 -fomit-frame-pointer
|
CC = gcc $(OPTIMIZE) -march=$(PROC) -fomit-frame-pointer
|
||||||
CCFLAGS += -c -DNeedFunctionPrototypes=1 -finline-functions -funroll-loops -fPIC
|
CCFLAGS += -c -DNeedFunctionPrototypes=1 -funroll-loops -fPIC
|
||||||
|
|
||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
|
|
||||||
|
@@ -1,8 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.14 2003/02/12 13:59:15 matteo
|
Revision 1.15 2003/09/27 02:45:37 markster
|
||||||
mer feb 12 14:56:57 CET 2003
|
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
|
Revision 1.1.1.1 2003/02/12 13:59:15 matteo
|
||||||
mer feb 12 14:56:57 CET 2003
|
mer feb 12 14:56:57 CET 2003
|
||||||
@@ -61,9 +64,12 @@ static real c_b2 = .7f;
|
|||||||
/* SYNTHS Version 54 */
|
/* SYNTHS Version 54 */
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
* Revision 1.14 2003/02/12 13:59:15 matteo
|
* Revision 1.15 2003/09/27 02:45:37 markster
|
||||||
* mer feb 12 14:56:57 CET 2003
|
* 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
|
/* Revision 1.1.1.1 2003/02/12 13:59:15 matteo
|
||||||
/* mer feb 12 14:56:57 CET 2003
|
/* 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 *);
|
extern /* Subroutine */ int deemp_(real *, integer *, struct lpc10_decoder_state *);
|
||||||
real ratio;
|
real ratio;
|
||||||
integer ipiti[16];
|
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 *, real *, struct lpc10_decoder_state *), irc2pc_(real *, real *
|
||||||
, integer *, real *, real *);
|
, integer *, real *, real *);
|
||||||
real g2pass;
|
real g2pass;
|
||||||
@@ -184,9 +190,12 @@ static real c_b2 = .7f;
|
|||||||
real rci[160] /* was [10][16] */;
|
real rci[160] /* was [10][16] */;
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
* Revision 1.14 2003/02/12 13:59:15 matteo
|
* Revision 1.15 2003/09/27 02:45:37 markster
|
||||||
* mer feb 12 14:56:57 CET 2003
|
* 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
|
/* Revision 1.1.1.1 2003/02/12 13:59:15 matteo
|
||||||
/* mer feb 12 14:56:57 CET 2003
|
/* mer feb 12 14:56:57 CET 2003
|
||||||
/*
|
/*
|
||||||
@@ -218,9 +227,12 @@ static real c_b2 = .7f;
|
|||||||
/* Frame size, Prediction order, Pitch period */
|
/* Frame size, Prediction order, Pitch period */
|
||||||
/* Arguments */
|
/* Arguments */
|
||||||
/* $Log$
|
/* $Log$
|
||||||
* Revision 1.14 2003/02/12 13:59:15 matteo
|
* Revision 1.15 2003/09/27 02:45:37 markster
|
||||||
* mer feb 12 14:56:57 CET 2003
|
* 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
|
/* Revision 1.1.1.1 2003/02/12 13:59:15 matteo
|
||||||
/* mer feb 12 14:56:57 CET 2003
|
/* mer feb 12 14:56:57 CET 2003
|
||||||
/*
|
/*
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# LMC section
|
# 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
|
RANLIB=ranlib
|
||||||
|
|
||||||
# the XING decoder objs and dependencies:
|
# the XING decoder objs and dependencies:
|
||||||
|
@@ -40,7 +40,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/wait.h>
|
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
@@ -25,11 +25,12 @@
|
|||||||
#define TZ_STRLEN_MAX 255
|
#define TZ_STRLEN_MAX 255
|
||||||
/* #define DEBUG */
|
/* #define DEBUG */
|
||||||
#include <asterisk/lock.h>
|
#include <asterisk/lock.h>
|
||||||
|
#include <asterisk/localtime.h>
|
||||||
|
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#ifndef NOID
|
#ifndef NOID
|
||||||
static char elsieid[] = "@(#)localtime.c 7.57";
|
static const char elsieid[] = "@(#)localtime.c 7.57";
|
||||||
#endif /* !defined NOID */
|
#endif /* !defined NOID */
|
||||||
#endif /* !defined lint */
|
#endif /* !defined lint */
|
||||||
|
|
||||||
@@ -45,7 +46,7 @@ static char elsieid[] = "@(#)localtime.c 7.57";
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include "private.h"
|
#include "private.h"
|
||||||
#include "tzfile.h"
|
#include "tzfile.h"
|
||||||
#include "fcntl.h"
|
#include <fcntl.h>
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -929,7 +930,7 @@ ast_tzset P((const char *name))
|
|||||||
cur_state->ttis[0].tt_gmtoff = 0;
|
cur_state->ttis[0].tt_gmtoff = 0;
|
||||||
cur_state->ttis[0].tt_abbrind = 0;
|
cur_state->ttis[0].tt_abbrind = 0;
|
||||||
(void) strcpy(cur_state->chars, gmt);
|
(void) strcpy(cur_state->chars, gmt);
|
||||||
} else if (tzload(name, cur_state) != 0)
|
} else if (tzload(name, cur_state) != 0) {
|
||||||
if (name[0] == ':') {
|
if (name[0] == ':') {
|
||||||
(void) gmtload(cur_state);
|
(void) gmtload(cur_state);
|
||||||
} else if (tzparse(name, cur_state, FALSE) != 0) {
|
} else if (tzparse(name, cur_state, FALSE) != 0) {
|
||||||
@@ -938,6 +939,7 @@ ast_tzset P((const char *name))
|
|||||||
/* Last ditch, get GMT */
|
/* Last ditch, get GMT */
|
||||||
(void) gmtload(cur_state);
|
(void) gmtload(cur_state);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
strncpy(cur_state->name,name,sizeof(cur_state->name));
|
strncpy(cur_state->name,name,sizeof(cur_state->name));
|
||||||
if (last_lclptr)
|
if (last_lclptr)
|
||||||
last_lclptr->next = cur_state;
|
last_lclptr->next = cur_state;
|
||||||
|
Reference in New Issue
Block a user