mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-01 19:43:03 +00:00
fix various compiler warnings (bug #3938)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
20
ast_expr.y
20
ast_expr.y
@@ -24,19 +24,21 @@
|
||||
#include <asterisk/ast_expr.h>
|
||||
#include <asterisk/logger.h>
|
||||
|
||||
#ifndef QUAD_MIN
|
||||
#ifdef LONG_LONG_MIN
|
||||
#define QUAD_MIN LONG_LONG_MIN
|
||||
#endif
|
||||
#else /* LONG_LONG_MIN */
|
||||
#define QUAD_MIN (-0x7fffffffffffffffL-1)
|
||||
#endif /* LONG_LONG_MIN */
|
||||
#endif /* QUAD_MIN */
|
||||
|
||||
#ifndef QUAD_MAX
|
||||
#ifdef LONG_LONG_MAX
|
||||
#define QUAD_MAX LONG_LONG_MAX
|
||||
#endif
|
||||
|
||||
# if ! defined(QUAD_MIN)
|
||||
# define QUAD_MIN (-0x7fffffffffffffffL-1)
|
||||
# endif
|
||||
# if ! defined(QUAD_MAX)
|
||||
# define QUAD_MAX (0x7fffffffffffffffL)
|
||||
# endif
|
||||
#else /* LONG_LONG_MAX */
|
||||
#define QUAD_MAX (0x7fffffffffffffffL)
|
||||
#endif /* LONG_LONG_MAX */
|
||||
#endif /* QUAD_MAX */
|
||||
|
||||
#define YYPARSE_PARAM kota
|
||||
#define YYLEX_PARAM kota
|
||||
|
||||
@@ -1395,6 +1395,7 @@ static int __do_deliver(void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef NEWJB
|
||||
static int do_deliver(void *data)
|
||||
{
|
||||
/* Locking version of __do_deliver */
|
||||
@@ -1406,6 +1407,7 @@ static int do_deliver(void *data)
|
||||
ast_mutex_unlock(&iaxsl[callno]);
|
||||
return res;
|
||||
}
|
||||
#endif /* NEWJB */
|
||||
|
||||
static int handle_error(void)
|
||||
{
|
||||
@@ -4138,7 +4140,11 @@ static int iax2_show_peers(int fd, int argc, char *argv[])
|
||||
static int iax2_show_firmware(int fd, int argc, char *argv[])
|
||||
{
|
||||
#define FORMAT2 "%-15.15s %-15.15s %-15.15s\n"
|
||||
#if !defined(__FreeBSD__)
|
||||
#define FORMAT "%-15.15s %-15d %-15d\n"
|
||||
#else /* __FreeBSD__ */
|
||||
#define FORMAT "%-15.15s %-15d %-15ld\n"
|
||||
#endif /* __FreeBSD__ */
|
||||
struct iax_firmware *cur;
|
||||
if ((argc != 3) && (argc != 4))
|
||||
return RESULT_SHOWUSAGE;
|
||||
@@ -4148,7 +4154,7 @@ static int iax2_show_firmware(int fd, int argc, char *argv[])
|
||||
for (cur = waresl.wares;cur;cur = cur->next) {
|
||||
if ((argc == 3) || (!strcasecmp(argv[3], cur->fwh->devname)))
|
||||
ast_cli(fd, FORMAT, cur->fwh->devname, ntohs(cur->fwh->version),
|
||||
ntohl(cur->fwh->datalen));
|
||||
ntohl(cur->fwh->datalen));
|
||||
}
|
||||
ast_mutex_unlock(&waresl.lock);
|
||||
return RESULT_SUCCESS;
|
||||
|
||||
@@ -51,10 +51,6 @@ static void decrement_losspct(jitterbuf *jb)
|
||||
jb->info.losspct = (499 * jb->info.losspct)/500;
|
||||
}
|
||||
|
||||
|
||||
static void jb_dbginfo(jitterbuf *jb);
|
||||
|
||||
|
||||
void jb_reset(jitterbuf *jb)
|
||||
{
|
||||
memset(jb,0,sizeof(jitterbuf));
|
||||
@@ -395,6 +391,7 @@ static jb_frame *queue_getall(jitterbuf *jb)
|
||||
return _queue_get(jb,0,1);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* some diagnostics */
|
||||
static void jb_dbginfo(jitterbuf *jb)
|
||||
{
|
||||
@@ -418,6 +415,7 @@ static void jb_dbginfo(jitterbuf *jb)
|
||||
queue_last(jb) - queue_next(jb),
|
||||
jb->info.last_voice_ms);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEEP_DEBUG
|
||||
static void jb_chkqueue(jitterbuf *jb)
|
||||
|
||||
@@ -436,7 +436,7 @@ static int get_user_input(char *msg, char *buf, int buflen)
|
||||
|
||||
newtCenteredWindow(60,7, msg);
|
||||
|
||||
inpfield = newtEntry(5, 2, "", 50, &input, 0);
|
||||
inpfield = newtEntry(5, 2, "", 50, (char **) &input, 0);
|
||||
ok = newtButton(22, 3, "OK");
|
||||
cancel = newtButton(32, 3, "Cancel");
|
||||
form = newtForm(NULL, NULL, 0);
|
||||
@@ -603,8 +603,8 @@ static int login(char *hostname)
|
||||
ulabel = newtLabel(4,2,"Username:");
|
||||
plabel = newtLabel(4,3,"Password:");
|
||||
|
||||
username = newtEntry(14, 2, "", 20, &user, 0);
|
||||
password = newtEntry(14, 3, "", 20, &pass, NEWT_FLAG_HIDDEN);
|
||||
username = newtEntry(14, 2, "", 20, (char **) &user, 0);
|
||||
password = newtEntry(14, 3, "", 20, (char **) &pass, NEWT_FLAG_HIDDEN);
|
||||
|
||||
form = newtForm(NULL, NULL, 0);
|
||||
newtFormAddComponents(form, username, password, login, cancel, label, ulabel, plabel,NULL);
|
||||
|
||||
Reference in New Issue
Block a user