summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2016-11-22 23:46:00 +1100
committerWim Taymans <wtaymans@redhat.com>2016-11-28 10:36:34 +0100
commit35304ee4890e70cf004744c5f44a05fea46fea95 (patch)
treea898e721de866658a3938d3f2c2160ccaa77da82
parent6b6c3bec094d7b31456be257d9c575bdfd044861 (diff)
flxdec: fix some warnings comparing unsigned < 0
bf43f44fcfada5ec4a3ce60cb374340486fe9fac was comparing an unsigned expression to be < 0 which was always false. gstflxdec.c: In function ‘flx_decode_brun’: gstflxdec.c:322:33: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if ((glong) row - count < 0) { ^ gstflxdec.c:332:33: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if ((glong) row - count < 0) { ^ https://bugzilla.gnome.org/show_bug.cgi?id=774834
-rw-r--r--gst/flx/gstflxdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
index d51a8e661..e675c99b4 100644
--- a/gst/flx/gstflxdec.c
+++ b/gst/flx/gstflxdec.c
@@ -319,7 +319,7 @@ flx_decode_brun (GstFlxDec * flxdec, guchar * data, guchar * dest)
if (count > 0x7f) {
/* literal run */
count = 0x100 - count;
- if ((glong) row - count < 0) {
+ if ((glong) row - (glong) count < 0) {
GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected.");
return FALSE;
}
@@ -329,7 +329,7 @@ flx_decode_brun (GstFlxDec * flxdec, guchar * data, guchar * dest)
*dest++ = *data++;
} else {
- if ((glong) row - count < 0) {
+ if ((glong) row - (glong) count < 0) {
GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected.");
return FALSE;
}