fixed rest of warning for gcc 3 in /sys
authorBenjamin Otte <otte@gnome.org>
Sat, 6 Apr 2002 15:14:41 +0000 (15:14 +0000)
committerBenjamin Otte <otte@gnome.org>
Sat, 6 Apr 2002 15:14:41 +0000 (15:14 +0000)
Original commit message from CVS:
fixed rest of warning for gcc 3 in /sys

sys/v4l/gstv4lelement.c
sys/v4l/gstv4lmjpegsink.c
sys/v4l/gstv4lmjpegsrc.c
sys/v4l/v4lsrc_calls.c

index b1583d2b7284cf0fea3fa7ed66172cebe64c1d46..96c1486f0c7183fa8074f92679ef8dc283fbcefb 100644 (file)
@@ -570,6 +570,7 @@ gst_v4lelement_change_state (GstElement *element)
           case V4L_AUDIO_MUTE:   temp = v4lelement->mute;   break;
           case V4L_AUDIO_VOLUME: temp = v4lelement->volume; break;
           case V4L_AUDIO_MODE:   temp = v4lelement->mode;   break;
+         default: temp = 0; g_assert_not_reached ();
         }
         if (temp >= 0 && gst_v4l_has_audio(v4lelement))
         {
@@ -585,6 +586,7 @@ gst_v4lelement_change_state (GstElement *element)
           case V4L_PICTURE_BRIGHTNESS: temp = v4lelement->brightness; break;
           case V4L_PICTURE_SATURATION: temp = v4lelement->saturation; break;
           case V4L_PICTURE_CONTRAST:   temp = v4lelement->contrast;   break;
+         default: temp = 0; g_assert_not_reached ();
         }
         if (temp >= 0)
         {
index 09960101ca6f430d8d89e62e67d00c1ced017dd0..355d8986e9554bcbbb5a20e7a53f33da95756e9e 100644 (file)
@@ -66,7 +66,6 @@ static void                  gst_v4lmjpegsink_get_property (GObject
                                                             guint                prop_id,
                                                             GValue               *value,
                                                             GParamSpec           *pspec);
-static void                  gst_v4lmjpegsink_close        (GstV4lMjpegSink      *v4lmjpegsink);
 static GstElementStateReturn gst_v4lmjpegsink_change_state (GstElement           *element);
 static void                 gst_v4lmjpegsink_set_clock    (GstElement *element, GstClock *clock);
 
@@ -237,7 +236,7 @@ gst_v4lmjpegsink_chain (GstPad    *pad,
   if (v4lmjpegsink->clock) {
     GST_DEBUG (0,"videosink: clock wait: %llu", GST_BUFFER_TIMESTAMP(buf));
 
-    jitter = gst_clock_current_diff(v4lmjpegsink->clock, GST_BUFFER_TIMESTAMP (buf));
+    jitter = 0; /* FIXME: jitter = gst_clock_current_diff(v4lmjpegsink->clock, GST_BUFFER_TIMESTAMP (buf)); */
 
     if (jitter > 500000 || jitter < -500000)
       GST_DEBUG (0, "jitter: %lld", jitter);
@@ -367,8 +366,11 @@ gst_v4lmjpegsink_change_state (GstElement *element)
       break;
   }
 
-  if (GST_ELEMENT_CLASS (parent_class)->change_state)
+  if (GST_ELEMENT_CLASS (parent_class)->change_state) {
     parent_value = GST_ELEMENT_CLASS (parent_class)->change_state (element);
+  } else {
+    parent_value = GST_STATE_FAILURE;
+  }
 
   if (GST_STATE_TRANSITION(element) == GST_STATE_NULL_TO_READY)
   {
index 77be2fccf0fa2d1e6a1bef3d7d28d3047bff1807..05ad433c4aa8ab5c0f51c4561d040c57f9cce5fc 100644 (file)
@@ -414,8 +414,11 @@ gst_v4lmjpegsrc_change_state (GstElement *element)
       break;
   }
 
-  if (GST_ELEMENT_CLASS (parent_class)->change_state)
+  if (GST_ELEMENT_CLASS (parent_class)->change_state) {
     parent_value = GST_ELEMENT_CLASS (parent_class)->change_state (element);
+  } else {
+    parent_value = GST_STATE_FAILURE;
+  }
 
   if (GST_STATE_TRANSITION(element) == GST_STATE_NULL_TO_READY)
   {
index 940e2a575adc21f0767f8f09cd4e84f75d320d76..0dc30d0132c36c175ca6e82351353859269ec9b3 100644 (file)
@@ -484,7 +484,7 @@ gst_v4lsrc_requeue_frame (GstV4lSrc *v4lsrc, gint  num)
 gboolean
 gst_v4lsrc_capture_stop (GstV4lSrc *v4lsrc)
 {
-  int n, num;
+  int n;
 
 #ifdef DEBUG
   fprintf(stderr, "V4LSRC: gst_v4lsrc_capture_stop()\n");