diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 2c000a3420aa30bdb406f12ab20eab97cc4c0bd4..37dab73dc06f741d5c8fc16339594d8a7b4abf9b 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -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
 }
 
 /**
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 03c95c191df60d1b1dd1e7ea7813fadb4a753074..986cad5fd257da4d02a1bd8c377db0e7c957fb24 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -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
 }
 
 /**
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 4fafb26259919710787d6f081da06b7941fe2724..38fe4f9fa2f070deaf97d4760b9d5234896f35f8 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -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
diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c
index 01e6f55cd4f9f2ee8e0bc4525a3d89d3cfb31419..5e6a7768242ebb025d8d7ff9d9bae6519c0d110f 100644
--- a/libavformat/bethsoftvid.c
+++ b/libavformat/bethsoftvid.c
@@ -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 = {
diff --git a/libavformat/mm.c b/libavformat/mm.c
index bea6161315f8ff0b73359912b51adf5da642659f..dae659f3c6f3eefc29a06d1d1cafdc007a8a91e4 100644
--- a/libavformat/mm.c
+++ b/libavformat/mm.c
@@ -184,8 +184,6 @@ static int read_packet(AVFormatContext *s,
             avio_skip(pb, length);
         }
     }
-
-    return 0;
 }
 
 AVInputFormat ff_mm_demuxer = {
diff --git a/libavformat/mmsh.c b/libavformat/mmsh.c
index af040e27a99a1d036be99b1bbba5ffb2e1ad3cd4..0ce282c906cdd58070a26ed5dc7425891287dca2 100644
--- a/libavformat/mmsh.c
+++ b/libavformat/mmsh.c
@@ -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)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index c720440472b597aa5ef368fdea2aa0a1fe22b489..194c2f86dd4ddff19a219ccac074e5369663ddc1 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index f499bd3b71cf56da058be2f1108d37ae0f7a8633..e841f9b8d178dba862f3b7d571f40b78f93fd819 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -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)
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index eec9524ecf26be5b6cd0d92ca3536a85945edc7c..c838fa8e61f27781b5909989f83080887db285c4 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -204,7 +204,6 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
     skip:
         avio_skip(pb, len);
     }
-    return 0;
 }
 
 AVInputFormat ff_swf_demuxer = {
diff --git a/libavutil/opt.c b/libavutil/opt.c
index f65f31fcdab3d5af26a24e82cf1a2c54953c7ca9..acb745cf3df0d31df1f224917f03866f05fb176f 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -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) {
diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c
index 0272c3ef677c3155d80dc97251bc699fda121bf5..c8124c532e2eadec37a8b70324f851eae717d3a4 100644
--- a/libavutil/parseutils.c
+++ b/libavutil/parseutils.c
@@ -462,7 +462,6 @@ const char *small_strptime(const char *p, const char *fmt,
             p++;
         }
     }
-    return p;
 }
 
 static time_t mktimegm(struct tm *tm)