[FFmpeg-cvslog] avutil/frame: suppress "comparison of unsigned expression < 0 is always false" warning

Michael Niedermayer git at videolan.org
Thu Sep 19 23:36:06 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Sep 19 22:46:52 2013 +0200| [1225b67fc9d769f04a4f7eea310402c1396748b6] | committer: Michael Niedermayer

avutil/frame: suppress "comparison of unsigned expression < 0 is always false" warning

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1225b67fc9d769f04a4f7eea310402c1396748b6
---

 libavutil/frame.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/frame.c b/libavutil/frame.c
index 0ce84d2..654f174 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -81,7 +81,7 @@ const char *av_get_colorspace_name(enum AVColorSpace val)
         [AVCOL_SPC_SMPTE240M] = "smpte240m",
         [AVCOL_SPC_YCOCG]     = "YCgCo",
     };
-    if (val < 0 || val >= FF_ARRAY_ELEMS(name))
+    if ((unsigned)val >= FF_ARRAY_ELEMS(name))
         return NULL;
     return name[val];
 }



More information about the ffmpeg-cvslog mailing list