[FFmpeg-cvslog] avcodec/utils: Fix warning: comparison between enum foo and enum bar [ -Wenum-compare]

Michael Niedermayer git at videolan.org
Mon Nov 10 03:00:26 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Nov 10 02:54:24 2014 +0100| [f6a8c77afb86f8aff61434426a19edecb391324d] | committer: Michael Niedermayer

avcodec/utils: Fix warning: comparison between enum foo and enum bar [-Wenum-compare]

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

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

 libavcodec/utils.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index c6b09a0..5ee6893 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -3023,8 +3023,8 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
             if (enc->colorspace != AVCOL_SPC_UNSPECIFIED ||
                 enc->color_primaries != AVCOL_PRI_UNSPECIFIED ||
                 enc->color_trc != AVCOL_TRC_UNSPECIFIED) {
-                if (enc->colorspace != enc->color_primaries ||
-                    enc->colorspace != enc->color_trc) {
+                if (enc->colorspace != (int)enc->color_primaries ||
+                    enc->colorspace != (int)enc->color_trc) {
                     new_line = 1;
                     av_strlcatf(detail, sizeof(detail), "%s/%s/%s, ",
                                 av_color_space_name(enc->colorspace),



More information about the ffmpeg-cvslog mailing list