diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2005-12-16 16:11:12 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2005-12-16 16:11:12 +0000 |
commit | 51b8766072b4f0f7e35846eaae55a7b6d838f8c1 (patch) | |
tree | fa39820db1c28d987573e10e8943d169e60e9270 | |
parent | b1f329655628288e1a62b14f5181e47bd8271a16 (diff) | |
download | gstreamer-51b8766072b4f0f7e35846eaae55a7b6d838f8c1.tar.gz |
gst/: Do not silently discard return values of g_list_delete_link() and g_list_append(). This would trigger gcc4 warn...
Original commit message from CVS:
Reviewed by: Tim-Philipp Müller <tim at centricular dot net>
* gst/autoplug/gstspider.c: (gst_spider_identity_unplug),
(gst_spider_create_and_plug):
* gst/elements/gstbufferstore.c: (gst_buffer_store_add_buffer_func):
Do not silently discard return values of g_list_delete_link()
and g_list_append(). This would trigger gcc4 warnings that
are treated as errors in CVS builds (fixes: #324260). Also
ifdef out unused function while we are at it.
-rw-r--r-- | ChangeLog | 12 | ||||
m--------- | common | 0 | ||||
-rw-r--r-- | gst/autoplug/gstspider.c | 15 | ||||
-rw-r--r-- | gst/elements/gstbufferstore.c | 2 |
4 files changed, 25 insertions, 4 deletions
@@ -1,3 +1,15 @@ +2005-12-16 Christian Kirbach <Christian.Kirbach@student.uni-siegen.de> + + Reviewed by: Tim-Philipp Müller <tim at centricular dot net> + + * gst/autoplug/gstspider.c: (gst_spider_identity_unplug), + (gst_spider_create_and_plug): + * gst/elements/gstbufferstore.c: (gst_buffer_store_add_buffer_func): + Do not silently discard return values of g_list_delete_link() + and g_list_append(). This would trigger gcc4 warnings that + are treated as errors in CVS builds (fixes: #324260). Also + ifdef out unused function while we are at it. + 2005-10-27 Tim-Philipp Müller <tim at centricular dot net> * examples/retag/retag.c: (main): diff --git a/common b/common -Subproject 1cb5d7b76a01c711674c752015089e70c394fa9 +Subproject 4edc214072fe07d2aade96bc336493425654d7b diff --git a/gst/autoplug/gstspider.c b/gst/autoplug/gstspider.c index 86a359e006..3bb06cdc73 100644 --- a/gst/autoplug/gstspider.c +++ b/gst/autoplug/gstspider.c @@ -99,7 +99,8 @@ static void gst_spider_get_property (GObject * object, guint prop_id, /* link functions */ static GstSpiderConnection *gst_spider_link_new (GstSpiderIdentity * src); -static void gst_spider_link_destroy (GstSpiderConnection * conn); + +/* static void gst_spider_link_destroy (GstSpiderConnection * conn); */ static void gst_spider_link_reset (GstSpiderConnection * conn, GstElement * to); static void gst_spider_link_add (GstSpiderConnection * conn, GstElement * element); @@ -351,6 +352,8 @@ gst_spider_link_new (GstSpiderIdentity * src) return conn; } + +#if 0 static void gst_spider_link_destroy (GstSpiderConnection * conn) { @@ -360,6 +363,8 @@ gst_spider_link_destroy (GstSpiderConnection * conn) gst_spider_link_reset (conn, (GstElement *) spider->sink_ident); g_free (conn); } +#endif + static void gst_spider_link_reset (GstSpiderConnection * conn, GstElement * to) { @@ -519,6 +524,7 @@ gst_spider_identity_plug (GstSpiderIdentity * ident) ident->plugged = TRUE; } +#if 0 void gst_spider_identity_unplug (GstSpiderIdentity * ident) { @@ -529,12 +535,15 @@ gst_spider_identity_unplug (GstSpiderIdentity * ident) GstSpiderConnection *conn = list->data; if (conn->src == ident) { - g_list_delete_link (spider->links, list); + spider->links = g_list_delete_link (spider->links, list); gst_spider_link_destroy (conn); + /* assuming we have found the one and only list item */ + break; } } ident->plugged = FALSE; } +#endif /* links src to sink using the elementfactories in plugpath * plugpath will be removed afterwards */ @@ -561,7 +570,7 @@ gst_spider_create_and_plug (GstSpiderConnection * conn, GList * plugpath) endelements = g_list_prepend (endelements, element); templist = g_list_previous (templist); - g_list_delete_link (cur, cur); + cur = g_list_delete_link (cur, cur); } } diff --git a/gst/elements/gstbufferstore.c b/gst/elements/gstbufferstore.c index f3d8e55089..8fef82e30a 100644 --- a/gst/elements/gstbufferstore.c +++ b/gst/elements/gstbufferstore.c @@ -233,7 +233,7 @@ gst_buffer_store_add_buffer_func (GstBufferStore * store, GstBuffer * buffer) "adding buffer %p with offset %" G_GINT64_FORMAT " and size %u", buffer, GST_BUFFER_OFFSET (buffer), GST_BUFFER_SIZE (buffer)); if (current_list) { - g_list_append (current_list, buffer); + current_list = g_list_append (current_list, buffer); } else { g_assert (store->buffers == NULL); store->buffers = g_list_prepend (NULL, buffer); |