GNOME Bugzilla – Bug 515193
possible gst_caps_intersect zig-zagging regression
Last modified: 2008-02-08 13:13:43 UTC
Consider this code: GstCaps * gst_caps_intersect (const GstCaps * caps1, const GstCaps * caps2) { guint64 i; /* index can be up to 2 * G_MAX_UINT */ guint j, k; ... for (i = 0; i < caps1->structs->len + caps2->structs->len - 1; i++) { /* caps1 index goes from 0 to caps1->structs->len-1 */ j = MIN (i, caps1->structs->len - 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); ... } ... and this compiler warning (refering to the k = ... line): gstcaps.c: In function 'gst_caps_intersect': gstcaps.c:1254: warning: comparison of unsigned expression < 0 is always false and this commit: http://webcvs.freedesktop.org/gstreamer/gstreamer/gst/gstcaps.c?r1=1.149&r2=1.150 I wonder if this still works like it was supposed to.
Seems to, at least according to printf, sorry for the noise.