OSDN Git Service

Remove return statements following infinite loops without break
authorMans Rullgard <mans@mansr.com>
Sun, 3 Jul 2011 20:02:18 +0000 (21:02 +0100)
committerMans Rullgard <mans@mansr.com>
Sun, 3 Jul 2011 20:39:07 +0000 (21:39 +0100)
These statements cannot be reached and are thus not needed.
This removes a number of compiler warnings.

Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/h264.c
libavcodec/mpeg12.c
libavformat/asfdec.c
libavformat/bethsoftvid.c
libavformat/mm.c
libavformat/mmsh.c
libavformat/mov.c
libavformat/rtmpproto.c
libavformat/swfdec.c
libavutil/opt.c
libavutil/parseutils.c

index 2c000a3..37dab73 100644 (file)
@@ -3552,7 +3552,6 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){
         ff_draw_horiz_band(s, 16*s->mb_y, 16);
     }
 #endif
-    return -1; //not reached
 }
 
 /**
index 03c95c1..986cad5 100644 (file)
@@ -1928,8 +1928,6 @@ static int slice_decode_thread(AVCodecContext *c, void *arg){
         if(mb_y < 0 || mb_y >= s->end_mb_y)
             return -1;
     }
-
-    return 0; //not reached
 }
 
 /**
index 4fafb26..38fe4f9 100644 (file)
@@ -1099,8 +1099,6 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt)
             assert(asf->packet_size_left < FRAME_HEADER_SIZE || asf->packet_segments < 1);
         asf->packet_time_start = 0;
     }
-
-    return 0;
 }
 
 // Added to support seeking after packets have been read
index 01e6f55..5e6a776 100644 (file)
@@ -220,8 +220,6 @@ static int vid_read_packet(AVFormatContext *s,
             av_log(s, AV_LOG_ERROR, "unknown block (character = %c, decimal = %d, hex = %x)!!!\n",
                    block_type, block_type, block_type); return -1;
     }
-
-    return 0;
 }
 
 AVInputFormat ff_bethsoftvid_demuxer = {
index bea6161..dae659f 100644 (file)
@@ -184,8 +184,6 @@ static int read_packet(AVFormatContext *s,
             avio_skip(pb, length);
         }
     }
-
-    return 0;
 }
 
 AVInputFormat ff_mm_demuxer = {
index af040e2..0ce282c 100644 (file)
@@ -208,7 +208,6 @@ static int get_http_header_data(MMSHContext *mmsh)
             }
         }
     }
-    return 0;
 }
 
 static int mmsh_open(URLContext *h, const char *uri, int flags)
index c720440..194c2f8 100644 (file)
@@ -2308,7 +2308,6 @@ static int mov_probe(AVProbeData *p)
             return score;
         }
     }
-    return score;
 }
 
 // must be done after parsing all trak because there's no order requirement
index f499bd3..e841f9b 100644 (file)
@@ -761,7 +761,6 @@ static int get_packet(URLContext *s, int for_header)
         }
         ff_rtmp_packet_destroy(&rpkt);
     }
-    return 0;
 }
 
 static int rtmp_close(URLContext *h)
index eec9524..c838fa8 100644 (file)
@@ -204,7 +204,6 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
     skip:
         avio_skip(pb, len);
     }
-    return 0;
 }
 
 AVInputFormat ff_swf_demuxer = {
index f65f31f..acb745c 100644 (file)
@@ -196,7 +196,6 @@ int av_set_string3(void *obj, const char *name, const char *val, int alloc, cons
                 return 0;
             notfirst=1;
         }
-        return AVERROR(EINVAL);
     }
 
     if (alloc) {
index 0272c3e..c8124c5 100644 (file)
@@ -462,7 +462,6 @@ const char *small_strptime(const char *p, const char *fmt,
             p++;
         }
     }
-    return p;
 }
 
 static time_t mktimegm(struct tm *tm)