[Ffmpeg-devel] [PATCH] fix two warnings in libavformat/rm.c

Dominik 'Rathann' Mierzejewski dominik
Sat May 13 23:17:04 CEST 2006


This fixes:
rm.c:561: warning: ?return? with a value, in function returning void
rm.c:573: warning: ?return? with a value, in function returning void
rm.c:586: warning: ?return? with a value, in function returning void

and:
rm.c: In function ?rm_read_packet?:
rm.c:957: warning: enumeration value ?CODEC_ID_NONE? not handled in switch
rm.c:957: warning: enumeration value ?CODEC_ID_MPEG1VIDEO? not handled in switch
rm.c:957: warning: enumeration value ?CODEC_ID_MPEG2VIDEO? not handled in switch
rm.c:957: warning: enumeration value ?CODEC_ID_MPEG2VIDEO_XVMC? not handled in switch
[...]
rm.c:957: warning: enumeration value ?CODEC_ID_OGGTHEORA? not handled in switch
rm.c:957: warning: enumeration value ?CODEC_ID_DVD_SUBTITLE? not handled in switch
rm.c:957: warning: enumeration value ?CODEC_ID_DVB_SUBTITLE? not handled in switch
rm.c:957: warning: enumeration value ?CODEC_ID_MPEG2TS? not handled in switch

Regards,
R.

-- 
MPlayer developer and RPMs maintainer: http://rpm.greysector.net/mplayer/
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
-------------- next part --------------
--- MPlayer-20060513/libavformat/rm.c.lavf	2006-05-13 21:41:36.000000000 +0200
+++ MPlayer-20060513/libavformat/rm.c	2006-05-13 22:37:44.000000000 +0200
@@ -483,7 +483,7 @@
     *q = '\0';
 }
 
-static void rm_read_audio_stream_info(AVFormatContext *s, AVStream *st,
+static int rm_read_audio_stream_info(AVFormatContext *s, AVStream *st,
                                       int read_all)
 {
     RMContext *rm = s->priv_data;
@@ -603,6 +603,7 @@
             get_str8(pb, s->comment, sizeof(s->comment));
         }
     }
+    return 0;
 }
 
 static int rm_read_header_old(AVFormatContext *s, AVFormatParameters *ap)
@@ -963,6 +964,8 @@
                         for (x = 0; x < w/sps; x++)
                             get_buffer(pb, rm->audiobuf+sps*(h*x+((h+1)/2)*(y&1)+(y>>1)), sps);
                         break;
+                    default:
+                        break;
                 }
 
                 if (++(rm->sub_packet_cnt) < h)



More information about the ffmpeg-devel mailing list