From 8f361ab00b8f87480d838036782e433053bd25b7 Mon Sep 17 00:00:00 2001 From: Brian West Date: Sat, 11 Apr 2015 11:13:07 -0500 Subject: [PATCH] Clang-3.5 warnings fixed --- src/switch_core_video.c | 4 ++-- src/switch_vidderbuffer.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/switch_core_video.c b/src/switch_core_video.c index b2945ba26c..5a86c37d34 100644 --- a/src/switch_core_video.c +++ b/src/switch_core_video.c @@ -162,7 +162,7 @@ SWITCH_DECLARE(void) switch_img_copy(switch_image_t *img, switch_image_t **new_i switch_assert(img); switch_assert(new_img); - if (!img->fmt == SWITCH_IMG_FMT_I420) return; + if (!(img->fmt == SWITCH_IMG_FMT_I420)) return; if (*new_img != NULL) { if (img->d_w != (*new_img)->d_w || img->d_h != (*new_img)->d_w) { @@ -196,7 +196,7 @@ SWITCH_DECLARE(switch_image_t *) switch_img_copy_rect(switch_image_t *img, int x switch_assert(img); switch_assert(x >= 0 && y >= 0 && w >= 0 && h >= 0); - if (!img->fmt == SWITCH_IMG_FMT_I420) return NULL; + if (!(img->fmt == SWITCH_IMG_FMT_I420)) return NULL; new_img = switch_img_alloc(NULL, SWITCH_IMG_FMT_I420, w, h, 1); if (new_img == NULL) return NULL; diff --git a/src/switch_vidderbuffer.c b/src/switch_vidderbuffer.c index 415f4f7cfc..55517515a3 100644 --- a/src/switch_vidderbuffer.c +++ b/src/switch_vidderbuffer.c @@ -255,8 +255,8 @@ static inline void add_node(switch_vb_t *vb, switch_rtp_packet_t *packet, switch - if (vb->write_init && ((abs(htons(packet->header.seq) - htons(vb->highest_wrote_seq)) > 16) || - (abs(ntohl(node->packet.header.ts) - ntohl(vb->highest_wrote_ts)) > 900000))) { + if (vb->write_init && ((abs(((int)htons(packet->header.seq) - htons(vb->highest_wrote_seq))) > 16) || + (abs((int)((int64_t)ntohl(node->packet.header.ts) - (int64_t)ntohl(vb->highest_wrote_ts))) > 900000))) { vb_debug(vb, 2, "%s", "CHANGE DETECTED, PUNT\n"); switch_vb_reset(vb); }