mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
Fix compile warnings (bug #389)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -31,7 +31,7 @@ LOCAL_USER_DECL;
|
||||
static int nocdr_exec(struct ast_channel *chan, void *data)
|
||||
{
|
||||
if (chan->cdr) {
|
||||
free(chan->cdr);
|
||||
ast_cdr_free(chan->cdr);
|
||||
chan->cdr = NULL;
|
||||
}
|
||||
return 0;
|
||||
|
@@ -533,7 +533,7 @@ static void showframe(struct ast_iax_frame *f, struct ast_iax_full_hdr *fhi, int
|
||||
retries, ntohs(fh->seqno), class, subclass);
|
||||
fprintf(stderr,
|
||||
" Timestamp: %05ldms Callno: %5.5d DCall: %5.5d [%s:%d]\n",
|
||||
ntohl(fh->ts),
|
||||
(long)ntohl(fh->ts),
|
||||
(short)(ntohs(fh->callno) & ~AST_FLAG_FULL), (short) ntohs(fh->dcallno),
|
||||
inet_ntoa(sin->sin_addr), ntohs(sin->sin_port));
|
||||
}
|
||||
|
@@ -64,7 +64,7 @@ static void dump_string(char *output, int maxlen, void *value, int len)
|
||||
static void dump_int(char *output, int maxlen, void *value, int len)
|
||||
{
|
||||
if (len == sizeof(unsigned int))
|
||||
snprintf(output, maxlen, "%ld", ntohl(*((unsigned int *)value)));
|
||||
snprintf(output, maxlen, "%ld", (long)ntohl(*((unsigned int *)value)));
|
||||
else
|
||||
snprintf(output, maxlen, "Invalid INT");
|
||||
}
|
||||
@@ -288,7 +288,7 @@ snprintf(tmp, sizeof(tmp),
|
||||
outputf(tmp);
|
||||
snprintf(tmp, sizeof(tmp),
|
||||
" Timestamp: %05ldms SCall: %5.5d DCall: %5.5d [%s:%d]\n",
|
||||
ntohl(fh->ts),
|
||||
(long)ntohl(fh->ts),
|
||||
ntohs(fh->scallno) & ~IAX_FLAG_FULL, ntohs(fh->dcallno) & ~IAX_FLAG_RETRANS,
|
||||
inet_ntoa(sin->sin_addr), ntohs(sin->sin_port));
|
||||
outputf(tmp);
|
||||
|
Reference in New Issue
Block a user