Browse code

Remove return statements following infinite loops without break

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>

Mans Rullgard authored on 2011/07/04 05:02:18
Showing 11 changed files
... ...
@@ -3552,7 +3552,6 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){
3552 3552
         ff_draw_horiz_band(s, 16*s->mb_y, 16);
3553 3553
     }
3554 3554
 #endif
3555
-    return -1; //not reached
3556 3555
 }
3557 3556
 
3558 3557
 /**
... ...
@@ -1928,8 +1928,6 @@ static int slice_decode_thread(AVCodecContext *c, void *arg){
1928 1928
         if(mb_y < 0 || mb_y >= s->end_mb_y)
1929 1929
             return -1;
1930 1930
     }
1931
-
1932
-    return 0; //not reached
1933 1931
 }
1934 1932
 
1935 1933
 /**
... ...
@@ -1099,8 +1099,6 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt)
1099 1099
             assert(asf->packet_size_left < FRAME_HEADER_SIZE || asf->packet_segments < 1);
1100 1100
         asf->packet_time_start = 0;
1101 1101
     }
1102
-
1103
-    return 0;
1104 1102
 }
1105 1103
 
1106 1104
 // Added to support seeking after packets have been read
... ...
@@ -220,8 +220,6 @@ static int vid_read_packet(AVFormatContext *s,
220 220
             av_log(s, AV_LOG_ERROR, "unknown block (character = %c, decimal = %d, hex = %x)!!!\n",
221 221
                    block_type, block_type, block_type); return -1;
222 222
     }
223
-
224
-    return 0;
225 223
 }
226 224
 
227 225
 AVInputFormat ff_bethsoftvid_demuxer = {
... ...
@@ -184,8 +184,6 @@ static int read_packet(AVFormatContext *s,
184 184
             avio_skip(pb, length);
185 185
         }
186 186
     }
187
-
188
-    return 0;
189 187
 }
190 188
 
191 189
 AVInputFormat ff_mm_demuxer = {
... ...
@@ -208,7 +208,6 @@ static int get_http_header_data(MMSHContext *mmsh)
208 208
             }
209 209
         }
210 210
     }
211
-    return 0;
212 211
 }
213 212
 
214 213
 static int mmsh_open(URLContext *h, const char *uri, int flags)
... ...
@@ -2308,7 +2308,6 @@ static int mov_probe(AVProbeData *p)
2308 2308
             return score;
2309 2309
         }
2310 2310
     }
2311
-    return score;
2312 2311
 }
2313 2312
 
2314 2313
 // must be done after parsing all trak because there's no order requirement
... ...
@@ -761,7 +761,6 @@ static int get_packet(URLContext *s, int for_header)
761 761
         }
762 762
         ff_rtmp_packet_destroy(&rpkt);
763 763
     }
764
-    return 0;
765 764
 }
766 765
 
767 766
 static int rtmp_close(URLContext *h)
... ...
@@ -204,7 +204,6 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
204 204
     skip:
205 205
         avio_skip(pb, len);
206 206
     }
207
-    return 0;
208 207
 }
209 208
 
210 209
 AVInputFormat ff_swf_demuxer = {
... ...
@@ -196,7 +196,6 @@ int av_set_string3(void *obj, const char *name, const char *val, int alloc, cons
196 196
                 return 0;
197 197
             notfirst=1;
198 198
         }
199
-        return AVERROR(EINVAL);
200 199
     }
201 200
 
202 201
     if (alloc) {
... ...
@@ -462,7 +462,6 @@ const char *small_strptime(const char *p, const char *fmt,
462 462
             p++;
463 463
         }
464 464
     }
465
-    return p;
466 465
 }
467 466
 
468 467
 static time_t mktimegm(struct tm *tm)