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.
This commit is contained in:
Tim-Philipp Müller 2005-12-16 16:11:12 +00:00
parent b1f3296556
commit 51b8766072
4 changed files with 26 additions and 5 deletions

View file

@ -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):

2
common

@ -1 +1 @@
Subproject commit 1cb5d7b76a01c711674c752015089e70c394fa99
Subproject commit 4edc214072fe07d2aade96bc336493425654d7b4

View file

@ -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);
}
}

View file

@ -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);