From 4985d2a954b293e56d670d10e2448ddd52d574d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 15 Aug 2011 21:05:34 +0100 Subject: [PATCH] caps: fix compiler warning reported by ICC The MAX macro expands to code that checks if an unsigned integer is < 0. Fixes warning #186: pointless comparison of unsigned integer reported by ICC. https://bugzilla.gnome.org/show_bug.cgi?id=656265 --- gst/gstcaps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/gstcaps.c b/gst/gstcaps.c index df348be..94b7000 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -1239,7 +1239,7 @@ gst_caps_can_intersect (const GstCaps * caps1, const GstCaps * caps2) j = MIN (i, len1 - 1); /* subset index stays 0 until i reaches superset->structs->len, then it * counts up from 1 to subset->structs->len - 1 */ - k = MAX (0, i - j); + k = (i > j) ? (i - j) : 0; /* MAX (0, i - j) */ /* now run the diagonal line, end condition is the left or bottom * border */ @@ -1310,7 +1310,7 @@ gst_caps_intersect_zig_zag (const GstCaps * caps1, const GstCaps * caps2) j = MIN (i, len1 - 1); /* caps2 index stays 0 until i reaches caps1->structs->len, then it counts * up from 1 to caps2->structs->len - 1 */ - k = MAX (0, i - j); + k = (i > j) ? (i - j) : 0; /* MAX (0, i - j) */ /* now run the diagonal line, end condition is the left or bottom * border */ -- 2.7.4