deinterlace, matroska: fix two variable-may-be-used-uninitialized compiler warnings
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 16 Apr 2011 15:51:32 +0000 (16:51 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 16 Apr 2011 15:51:32 +0000 (16:51 +0100)
We use -DG_DISABLE_ASSERT for the pre-releases, which makes these
warnings pop up in cases that were previously covered by g_assert_not_reached()
and the like:
tvtime/greedyh.c:801:14: warning: 'scanline' may be used uninitialized in this function
matroska-mux.c:501:19: warning: 'context' may be used uninitialized in this function

gst/deinterlace/tvtime/greedyh.c
gst/matroska/matroska-mux.c

index bd2794c..d1e4fd6 100644 (file)
@@ -749,7 +749,7 @@ deinterlace_frame_di_greedyh_packed (GstDeinterlaceMethod * method,
       break;
     default:
       g_assert_not_reached ();
-      break;
+      return;
   }
 
   // copy first even line no matter what, and the first odd line if we're
index 7be2245..7f94f18 100644 (file)
@@ -494,7 +494,7 @@ gst_matroska_pad_reset (GstMatroskaPad * collect_pad, gboolean full)
         break;
       default:
         g_assert_not_reached ();
-        break;
+        return;
     }
 
     context->type = type;