[FFmpeg-devel] [PATCH] Fix more of icc's warnings #188

Michael Niedermayer michaelni
Mon May 12 23:50:01 CEST 2008


On Mon, May 12, 2008 at 10:52:40PM +0200, Carl Eugen Hoyos wrote:
> Hi!
>
> Attached patch silences most of icc's warnings "enumerated type mixed with 
> another type".
> I don't know if all changes make actually sense, so please comment.
[...]
> @@ -3902,14 +3903,14 @@
>  
>  int main(int argc, char **argv)
>  {
> -    int i;
> +    enum CodecType i;
>      int64_t ti;

i do not like this one


>  
>      avcodec_register_all();
>      avdevice_register_all();
>      av_register_all();
>  
> -    for(i=0; i<CODEC_TYPE_NB; i++){
> +    for(i=CODEC_TYPE_VIDEO; i<CODEC_TYPE_NB; i++){

i neither like this one


[...]
> Index: libavcodec/imgconvert.c
> ===================================================================
> --- libavcodec/imgconvert.c	(revision 13132)
> +++ libavcodec/imgconvert.c	(working copy)
> @@ -397,9 +397,9 @@
>  
>  enum PixelFormat avcodec_get_pix_fmt(const char* name)
>  {
> -    int i;
> +    enum PixelFormat i;
>  
> -    for (i=0; i < PIX_FMT_NB; i++)
> +    for (i=PIX_FMT_NONE; i < PIX_FMT_NB; i++)

same issue


[...]
> Index: libavformat/matroskadec.c
> ===================================================================
> --- libavformat/matroskadec.c	(revision 13132)
> +++ libavformat/matroskadec.c	(working copy)
> @@ -1053,7 +1053,7 @@
>  
>              /* track type (video, audio, combined, subtitle, etc.) */
>              case MATROSKA_ID_TRACKTYPE: {
> -                uint64_t num;
> +                MatroskaTrackType num;

hmm, this looks wrong, enum != uint64_t


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080512/d94c0492/attachment.pgp>



More information about the ffmpeg-devel mailing list