Resolve compiler warnings on FreeBSD.
authorRussell Bryant <russell@russellbryant.com>
Sat, 20 Mar 2010 11:43:08 +0000 (11:43 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sat, 20 Mar 2010 11:43:08 +0000 (11:43 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253538 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_dial.c
apps/app_followme.c

index cff55af..d6430be 100644 (file)
@@ -1570,12 +1570,12 @@ static void end_bridge_callback(void *data)
 
        ast_channel_lock(chan);
        if (chan->cdr->answer.tv_sec) {
-               snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->answer.tv_sec);
+               snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->answer.tv_sec);
                pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", buf);
        }
 
        if (chan->cdr->start.tv_sec) {
-               snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->start.tv_sec);
+               snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->start.tv_sec);
                pbx_builtin_setvar_helper(chan, "DIALEDTIME", buf);
        }
        ast_channel_unlock(chan);
index 11bffaa..b6ad767 100644 (file)
@@ -990,12 +990,12 @@ static void end_bridge_callback(void *data)
 
        ast_channel_lock(chan);
        if (chan->cdr->answer.tv_sec) {
-               snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->answer.tv_sec);
+               snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->answer.tv_sec);
                pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", buf);
        }
 
        if (chan->cdr->start.tv_sec) {
-               snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->start.tv_sec);
+               snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->start.tv_sec);
                pbx_builtin_setvar_helper(chan, "DIALEDTIME", buf);
        }
        ast_channel_unlock(chan);