gst-libs/gst/: Turn a few g_assert_not_reached() into g_return_val_if_reached() to...
authorTim-Philipp Müller <tim@centricular.net>
Sun, 16 Dec 2007 23:52:58 +0000 (23:52 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Sun, 16 Dec 2007 23:52:58 +0000 (23:52 +0000)
Original commit message from CVS:
* gst-libs/gst/cdda/gstcddabasesrc.c: (gst_cdda_base_src_do_seek),
(gst_cdda_base_src_handle_track_seek), (gst_cdda_base_src_create):
* gst-libs/gst/pbutils/install-plugins.c:
(gst_install_plugins_spawn_child), (gst_install_plugins_supported):
* gst-libs/gst/pbutils/missing-plugins.c:
(gst_missing_plugin_message_get_installer_detail),
(gst_missing_encoder_installer_detail_new):
* gst-libs/gst/rtsp/gstrtspconnection.c: (gst_rtsp_connection_send):
* gst-libs/gst/rtsp/gstrtspmessage.c: (gst_rtsp_message_unset):
Turn a few g_assert_not_reached() into g_return_val_if_reached() to
avoid compiler warnings (#503930).

ChangeLog
gst-libs/gst/cdda/gstcddabasesrc.c
gst-libs/gst/pbutils/install-plugins.c
gst-libs/gst/pbutils/missing-plugins.c
gst-libs/gst/rtsp/gstrtspconnection.c
gst-libs/gst/rtsp/gstrtspmessage.c

index 84fbf7f..e1096fd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2007-12-16  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * gst-libs/gst/cdda/gstcddabasesrc.c: (gst_cdda_base_src_do_seek),
+         (gst_cdda_base_src_handle_track_seek), (gst_cdda_base_src_create):
+       * gst-libs/gst/pbutils/install-plugins.c:
+         (gst_install_plugins_spawn_child), (gst_install_plugins_supported):
+       * gst-libs/gst/pbutils/missing-plugins.c:
+         (gst_missing_plugin_message_get_installer_detail),
+         (gst_missing_encoder_installer_detail_new):
+       * gst-libs/gst/rtsp/gstrtspconnection.c: (gst_rtsp_connection_send):
+       * gst-libs/gst/rtsp/gstrtspmessage.c: (gst_rtsp_message_unset):
+         Turn a few g_assert_not_reached() into g_return_val_if_reached() to
+         avoid compiler warnings (#503930).
+
 2007-12-17  Edward Hervey  <edward.hervey@collabora.co.uk>
 
        * gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps):
index 9ab653d..60a8dcd 100644 (file)
@@ -704,7 +704,7 @@ gst_cdda_base_src_do_seek (GstBaseSrc * basesrc, GstSegment * segment)
       seek_sector += src->tracks[0].start;
       break;
     default:
-      g_assert_not_reached ();
+      g_return_val_if_reached (FALSE);
   }
 
   src->cur_sector = (gint) seek_sector;
@@ -754,7 +754,7 @@ gst_cdda_base_src_handle_track_seek (GstCddaBaseSrc * src, gdouble rate,
         start_time = -1;
         break;
       default:
-        g_assert_not_reached ();
+        g_return_val_if_reached (FALSE);
     }
 
     switch (stop_type) {
@@ -779,7 +779,7 @@ gst_cdda_base_src_handle_track_seek (GstCddaBaseSrc * src, gdouble rate,
         stop_time = -1;
         break;
       default:
-        g_assert_not_reached ();
+        g_return_val_if_reached (FALSE);
     }
 
     GST_LOG_OBJECT (src, "seek segment %" GST_TIME_FORMAT "-%" GST_TIME_FORMAT,
@@ -1510,7 +1510,7 @@ gst_cdda_base_src_create (GstPushSrc * pushsrc, GstBuffer ** buffer)
           src->cur_sector);
       break;
     default:
-      g_assert_not_reached ();
+      g_return_val_if_reached (GST_FLOW_ERROR);
   }
 
   if (eos) {
index 0bc79c3..a97eed8 100644 (file)
@@ -505,7 +505,7 @@ gst_install_plugins_spawn_child (gchar ** details,
     ret = g_spawn_async (NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, NULL,
         NULL, child_pid, &err);
   } else {
-    g_assert_not_reached ();
+    g_return_val_if_reached (FALSE);
   }
 
   if (!ret) {
index f78cfc8..18c1eff 100644 (file)
@@ -454,8 +454,7 @@ gst_missing_plugin_message_get_installer_detail (GstMessage * msg)
       break;
     }
     default:
-      g_assert_not_reached ();
-      break;
+      g_return_val_if_reached (NULL);
   }
 
   g_string_append_printf (str, "%s-%s", type, detail);
index a11f29b..48ffda2 100644 (file)
@@ -550,7 +550,7 @@ gst_rtsp_connection_send (GstRTSPConnection * conn, GstRTSPMessage * message,
       break;
     }
     default:
-      g_assert_not_reached ();
+      g_return_val_if_reached (GST_RTSP_EINVAL);
       break;
   }
 
index c1dc4d9..adf0d39 100644 (file)
@@ -448,8 +448,7 @@ gst_rtsp_message_unset (GstRTSPMessage * msg)
     case GST_RTSP_MESSAGE_DATA:
       break;
     default:
-      g_assert_not_reached ();
-      break;
+      g_return_val_if_reached (GST_RTSP_EINVAL);
   }
 
   if (msg->hdr_fields != NULL) {