Fix compile warnings (bug #389)
authorMark Spencer <markster@digium.com>
Wed, 22 Oct 2003 02:53:39 +0000 (02:53 +0000)
committerMark Spencer <markster@digium.com>
Wed, 22 Oct 2003 02:53:39 +0000 (02:53 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1644 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_cdr.c
channels/chan_iax.c
channels/iax2-parser.c

index 1720261..ce04f72 100755 (executable)
@@ -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;
index 12cc5b8..b80614d 100755 (executable)
@@ -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));
 }
index 1cfce46..8ffbd2c 100755 (executable)
@@ -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);