From 7b44e5b27cc6659a50ecc6a310e5b1ac57a3182b Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Wed, 29 Jan 2014 20:46:38 -0600 Subject: [PATCH] compiler warnings --- src/switch_rtp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 930e9089c8..d265a2d28f 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -1575,7 +1575,7 @@ static void send_pli(switch_rtp_t *rtp_session) static void do_mos(switch_rtp_t *rtp_session, int force) { - if (rtp_session->stats.inbound.recved < rtp_session->stats.inbound.flaws) { + if ((switch_size_t)rtp_session->stats.inbound.recved < rtp_session->stats.inbound.flaws) { rtp_session->stats.inbound.flaws = 0; } @@ -1599,7 +1599,7 @@ static void do_mos(switch_rtp_t *rtp_session, int force) { rtp_session->stats.inbound.flaws += penalty; } - R = ((double)((double)(rtp_session->stats.inbound.recved - rtp_session->stats.inbound.flaws) / (double)rtp_session->stats.inbound.recved) * 100.0); + R = (int)((double)((double)(rtp_session->stats.inbound.recved - rtp_session->stats.inbound.flaws) / (double)rtp_session->stats.inbound.recved) * 100.0); if (R < 0 || R > 100) R = 100; @@ -1719,7 +1719,7 @@ static void check_jitter(switch_rtp_t *rtp_session) rtp_session->stats.inbound.jitter_n++; rtp_session->stats.inbound.jitter_add += diff_time; - cur_diff = diff_time - rtp_session->stats.inbound.mean_interval; + cur_diff = (int64_t)(diff_time - rtp_session->stats.inbound.mean_interval); rtp_session->stats.inbound.jitter_addsq += (cur_diff * cur_diff); rtp_session->stats.inbound.last_proc_time = current_time;