From: <fe...@ke...> - 2010-10-01 00:47:16
|
Module: gst-openmax Branch: master Commit: 673fb214c759e27e2d63c11d0478d2f1f244b808 URL: http://cgit.freedesktop.org/gstreamer/gst-openmax/commit/?id=673fb214c759e27e2d63c11d0478d2f1f244b808 Author: Felipe Contreras <fel...@no...> Date: Mon Jun 7 21:56:35 2010 +0300 Fix compilation warnings Awful c89. Signed-off-by: Felipe Contreras <fel...@no...> --- omx/gstomx.c | 6 +++--- omx/gstomx_base_filter.c | 2 +- tests/check_async_queue.c | 5 ++--- tests/check_gstomx.c | 32 +------------------------------- tests/standalone/core.c | 4 ++-- 5 files changed, 9 insertions(+), 40 deletions(-) diff --git a/omx/gstomx.c b/omx/gstomx.c index 575227a..6c6a659 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -63,7 +63,7 @@ GST_DEBUG_CATEGORY (gstomx_debug); -const static GstStructure *element_table; +static const GstStructure *element_table; static GQuark element_name_quark; extern const gchar *default_config; @@ -207,7 +207,7 @@ static GType create_subtype (GType parent_type, const gchar *type_name) { GTypeQuery q; - GTypeInfo i = {0}; + GTypeInfo i = {0,0,0,0,0,0,0,0,0,0}; if (!type_name) return 0; @@ -223,7 +223,7 @@ create_subtype (GType parent_type, const gchar *type_name) static gboolean plugin_init (GstPlugin *plugin) { - gint i, cnt; + guint i, cnt; GST_DEBUG_CATEGORY_INIT (gstomx_debug, "omx", 0, "gst-openmax"); GST_DEBUG_CATEGORY_INIT (gstomx_util_debug, "omx_util", 0, "gst-openmax utility"); diff --git a/omx/gstomx_base_filter.c b/omx/gstomx_base_filter.c index 4581f16..fe8b8fe 100644 --- a/omx/gstomx_base_filter.c +++ b/omx/gstomx_base_filter.c @@ -419,7 +419,7 @@ output_loop (gpointer data) { GstCaps *caps = NULL; GstStructure *structure; - GValue value = { 0 }; + GValue value = {0, {{0}}}; caps = gst_pad_get_negotiated_caps (self->srcpad); caps = gst_caps_make_writable (caps); diff --git a/tests/check_async_queue.c b/tests/check_async_queue.c index 60c6526..2576035 100644 --- a/tests/check_async_queue.c +++ b/tests/check_async_queue.c @@ -216,7 +216,7 @@ pop_stress (gpointer data) { CustomData *custom_data; AsyncQueue *queue; - guint i, j; + guint i; custom_data = data; queue = custom_data->queue; @@ -364,7 +364,6 @@ START_TEST (test_async_queue_stress) { GThread *push_thread; GThread *pop_thread; - guint count; CustomData *custom_data; custom_data = custom_data_new (); @@ -379,7 +378,7 @@ START_TEST (test_async_queue_stress) } END_TEST -Suite * +static Suite * util_suite (void) { Suite *s = suite_create ("util"); diff --git a/tests/check_gstomx.c b/tests/check_gstomx.c index 5db576f..0684f92 100644 --- a/tests/check_gstomx.c +++ b/tests/check_gstomx.c @@ -25,36 +25,6 @@ #define BUFFER_COUNT 0x100 #define FLUSH_AT 0x10 -static gboolean -bus_cb (GstBus *bus, - GstMessage *msg, - gpointer data) -{ - switch (GST_MESSAGE_TYPE (msg)) - { - case GST_MESSAGE_EOS: - /* g_debug ("end-of-stream"); */ - break; - case GST_MESSAGE_ERROR: - { - gchar *debug; - GError *err; - - gst_message_parse_error (msg, &err, &debug); - g_free (debug); - - g_warning ("Error: %s", err->message); - g_error_free (err); - break; - } - default: - /* g_debug ("message-type: %s", GST_MESSAGE_TYPE_NAME (msg)); */ - break; - } - - return TRUE; -} - static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, @@ -72,7 +42,7 @@ static GMutex *eos_mutex; static GCond *eos_cond; static gboolean eos_arrived; -gboolean +static gboolean test_sink_event (GstPad * pad, GstEvent * event) { diff --git a/tests/standalone/core.c b/tests/standalone/core.c index 660eaef..c145524 100644 --- a/tests/standalone/core.c +++ b/tests/standalone/core.c @@ -176,13 +176,13 @@ comp_SendCommand (OMX_HANDLETYPE handle, { OMX_BUFFERHEADERTYPE *buffer; - while (buffer = async_queue_pop_forced (private->ports[0].queue)) + while ((buffer = async_queue_pop_forced (private->ports[0].queue))) { private->callbacks->EmptyBufferDone (comp, private->app_data, buffer); } - while (buffer = async_queue_pop_forced (private->ports[1].queue)) + while ((buffer = async_queue_pop_forced (private->ports[1].queue))) { private->callbacks->FillBufferDone (comp, private->app_data, buffer); |