[FFmpeg-devel] [PATCH]Silence two warnings when compiling with icc

Carl Eugen Hoyos cehoyos
Mon Dec 22 21:32:17 CET 2008


Hi!

Attached patch silences at least two warnings when compiling libavformat 
with icc:

/home/melanson/fate/source/libavformat/riff.c(424): warning #188: 
enumerated type mixed with another type
       codec->codec_id = wav_codec_get_id(id, codec->bits_per_coded_sample);
                       ^

/home/melanson/fate/source/libavformat/nuv.c(98): warning #188: enumerated 
type mixed with another type
                       ast->codec->codec_id =
                                            ^

Please comment, Carl Eugen
-------------- next part --------------
Index: libavformat/riff.h
===================================================================
--- libavformat/riff.h	(revision 16270)
+++ libavformat/riff.h	(working copy)
@@ -41,7 +41,7 @@
 
 void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag *tags, int for_asf);
 int put_wav_header(ByteIOContext *pb, AVCodecContext *enc);
-int wav_codec_get_id(unsigned int tag, int bps);
+enum CodecID wav_codec_get_id(unsigned int tag, int bps);
 void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size);
 
 extern const AVCodecTag codec_bmp_tags[];
Index: libavformat/riff.c
===================================================================
--- libavformat/riff.c	(revision 16270)
+++ libavformat/riff.c	(working copy)
@@ -425,9 +425,9 @@
 }
 
 
-int wav_codec_get_id(unsigned int tag, int bps)
+enum CodecID wav_codec_get_id(unsigned int tag, int bps)
 {
-    int id;
+    enum CodecID id;
     id = codec_get_id(codec_wav_tags, tag);
     if (id <= 0)
         return id;



More information about the ffmpeg-devel mailing list