From 58cc2ede0a22602fca883d78a65dccdc3c228bf6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 29 Feb 2008 13:59:24 +0000 Subject: [PATCH] And correct even more valid sparse warnings. Original commit message from CVS: * gst/gstelementfactory.h: * tests/check/elements/fakesink.c: * tests/check/elements/fakesrc.c: (setup_fakesrc): * tests/check/elements/fdsrc.c: (setup_fdsrc): * tests/check/elements/filesink.c: (setup_filesink): * tests/check/elements/filesrc.c: (setup_filesrc): * tests/check/elements/identity.c: (setup_identity): * tests/check/elements/tee.c: * tests/check/generic/sinks.c: * tests/check/generic/states.c: (setup), (teardown): * tests/check/gst/gst.c: * tests/check/gst/gstabi.c: * tests/check/gst/gstbin.c: * tests/check/gst/gstbus.c: (pull_messages): * tests/check/gst/gstcaps.c: * tests/check/gst/gstelement.c: * tests/check/gst/gstevent.c: * tests/check/gst/gstghostpad.c: * tests/check/gst/gstiterator.c: * tests/check/gst/gstmessage.c: * tests/check/gst/gstminiobject.c: (my_foo_init): * tests/check/gst/gstobject.c: (thread_name_object), (gst_object_suite): * tests/check/gst/gstpad.c: * tests/check/gst/gstplugin.c: * tests/check/gst/gstpoll.c: * tests/check/gst/gstquery.c: * tests/check/gst/gstsegment.c: * tests/check/gst/gststructure.c: * tests/check/gst/gstsystemclock.c: * tests/check/gst/gsttask.c: * tests/check/gst/gstutils.c: * tests/check/gst/gstvalue.c: * tests/check/gst/struct_hppa.h: * tests/check/gst/struct_i386.h: * tests/check/gst/struct_ppc32.h: * tests/check/gst/struct_ppc64.h: * tests/check/gst/struct_x86_64.h: * tests/check/libs/adapter.c: (create_and_fill_adapter): * tests/check/libs/basesrc.c: * tests/check/libs/controller.c: (GST_START_TEST): * tests/check/libs/gdp.c: * tests/check/libs/gstnetclientclock.c: * tests/check/libs/gstnettimeprovider.c: * tests/check/libs/libsabi.c: * tests/check/libs/struct_hppa.h: * tests/check/libs/struct_i386.h: * tests/check/libs/struct_ppc32.h: * tests/check/libs/struct_ppc64.h: * tests/check/libs/struct_x86_64.h: * tests/check/pipelines/cleanup.c: * tests/check/pipelines/simple-launch-lines.c: * tests/check/pipelines/stress.c: And correct even more valid sparse warnings. * win32/common/libgstreamer.def: Add gst_poll_fd_init to the list of symbols. --- ChangeLog | 60 +++++++++++++++++++++++++++++ gst/gstelementfactory.h | 2 +- tests/check/elements/fakesink.c | 2 +- tests/check/elements/fakesrc.c | 14 +++---- tests/check/elements/fdsrc.c | 14 +++---- tests/check/elements/filesink.c | 6 +-- tests/check/elements/filesrc.c | 12 +++--- tests/check/elements/identity.c | 14 +++---- tests/check/elements/tee.c | 2 +- tests/check/generic/sinks.c | 2 +- tests/check/generic/states.c | 6 +-- tests/check/gst/gst.c | 2 +- tests/check/gst/gstabi.c | 2 +- tests/check/gst/gstbin.c | 2 +- tests/check/gst/gstbus.c | 4 +- tests/check/gst/gstcaps.c | 2 +- tests/check/gst/gstelement.c | 2 +- tests/check/gst/gstevent.c | 8 ++-- tests/check/gst/gstghostpad.c | 2 +- tests/check/gst/gstiterator.c | 2 +- tests/check/gst/gstmessage.c | 2 +- tests/check/gst/gstminiobject.c | 15 ++++---- tests/check/gst/gstobject.c | 40 +++++++++++-------- tests/check/gst/gstpad.c | 6 +-- tests/check/gst/gstplugin.c | 2 +- tests/check/gst/gstpoll.c | 2 +- tests/check/gst/gstquery.c | 2 +- tests/check/gst/gstsegment.c | 2 +- tests/check/gst/gststructure.c | 2 +- tests/check/gst/gstsystemclock.c | 29 +++++++++----- tests/check/gst/gsttask.c | 2 +- tests/check/gst/gstutils.c | 2 +- tests/check/gst/gstvalue.c | 2 +- tests/check/gst/struct_hppa.h | 2 +- tests/check/gst/struct_i386.h | 2 +- tests/check/gst/struct_ppc32.h | 2 +- tests/check/gst/struct_ppc64.h | 2 +- tests/check/gst/struct_x86_64.h | 2 +- tests/check/libs/adapter.c | 4 +- tests/check/libs/basesrc.c | 2 +- tests/check/libs/controller.c | 2 +- tests/check/libs/gdp.c | 2 +- tests/check/libs/gstnetclientclock.c | 2 +- tests/check/libs/gstnettimeprovider.c | 2 +- tests/check/libs/libsabi.c | 2 +- tests/check/libs/struct_hppa.h | 2 +- tests/check/libs/struct_i386.h | 2 +- tests/check/libs/struct_ppc32.h | 2 +- tests/check/libs/struct_ppc64.h | 2 +- tests/check/libs/struct_x86_64.h | 2 +- tests/check/pipelines/cleanup.c | 2 +- tests/check/pipelines/simple-launch-lines.c | 2 +- tests/check/pipelines/stress.c | 2 +- win32/common/libgstreamer.def | 1 + 54 files changed, 195 insertions(+), 116 deletions(-) diff --git a/ChangeLog b/ChangeLog index a78e635..e5e8149 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,65 @@ 2008-02-29 Sebastian Dröge + * gst/gstelementfactory.h: + * tests/check/elements/fakesink.c: + * tests/check/elements/fakesrc.c: (setup_fakesrc): + * tests/check/elements/fdsrc.c: (setup_fdsrc): + * tests/check/elements/filesink.c: (setup_filesink): + * tests/check/elements/filesrc.c: (setup_filesrc): + * tests/check/elements/identity.c: (setup_identity): + * tests/check/elements/tee.c: + * tests/check/generic/sinks.c: + * tests/check/generic/states.c: (setup), (teardown): + * tests/check/gst/gst.c: + * tests/check/gst/gstabi.c: + * tests/check/gst/gstbin.c: + * tests/check/gst/gstbus.c: (pull_messages): + * tests/check/gst/gstcaps.c: + * tests/check/gst/gstelement.c: + * tests/check/gst/gstevent.c: + * tests/check/gst/gstghostpad.c: + * tests/check/gst/gstiterator.c: + * tests/check/gst/gstmessage.c: + * tests/check/gst/gstminiobject.c: (my_foo_init): + * tests/check/gst/gstobject.c: (thread_name_object), + (gst_object_suite): + * tests/check/gst/gstpad.c: + * tests/check/gst/gstplugin.c: + * tests/check/gst/gstpoll.c: + * tests/check/gst/gstquery.c: + * tests/check/gst/gstsegment.c: + * tests/check/gst/gststructure.c: + * tests/check/gst/gstsystemclock.c: + * tests/check/gst/gsttask.c: + * tests/check/gst/gstutils.c: + * tests/check/gst/gstvalue.c: + * tests/check/gst/struct_hppa.h: + * tests/check/gst/struct_i386.h: + * tests/check/gst/struct_ppc32.h: + * tests/check/gst/struct_ppc64.h: + * tests/check/gst/struct_x86_64.h: + * tests/check/libs/adapter.c: (create_and_fill_adapter): + * tests/check/libs/basesrc.c: + * tests/check/libs/controller.c: (GST_START_TEST): + * tests/check/libs/gdp.c: + * tests/check/libs/gstnetclientclock.c: + * tests/check/libs/gstnettimeprovider.c: + * tests/check/libs/libsabi.c: + * tests/check/libs/struct_hppa.h: + * tests/check/libs/struct_i386.h: + * tests/check/libs/struct_ppc32.h: + * tests/check/libs/struct_ppc64.h: + * tests/check/libs/struct_x86_64.h: + * tests/check/pipelines/cleanup.c: + * tests/check/pipelines/simple-launch-lines.c: + * tests/check/pipelines/stress.c: + And correct even more valid sparse warnings. + + * win32/common/libgstreamer.def: + Add gst_poll_fd_init to the list of symbols. + +2008-02-29 Sebastian Dröge + * gst/gstconfig.h.in: * libs/gst/base/gstcollectpads.c: (gst_collect_pads_read_buffer): * libs/gst/check/gstcheck.c: (gst_check_log_message_func), diff --git a/gst/gstelementfactory.h b/gst/gstelementfactory.h index a07b759..02ed118 100644 --- a/gst/gstelementfactory.h +++ b/gst/gstelementfactory.h @@ -81,7 +81,7 @@ struct _GstElementDetails * Macro to initialize #GstElementDetails. */ #define GST_ELEMENT_DETAILS(longname,klass,description,author) \ - { longname, klass, description, author, {0} } + { longname, klass, description, author, {NULL} } /** * GST_IS_ELEMENT_DETAILS: diff --git a/tests/check/elements/fakesink.c b/tests/check/elements/fakesink.c index 0c1b299..fbaaa5f 100644 --- a/tests/check/elements/fakesink.c +++ b/tests/check/elements/fakesink.c @@ -523,7 +523,7 @@ GST_START_TEST (test_eos2) GST_END_TEST; -Suite * +static Suite * fakesink_suite (void) { Suite *s = suite_create ("fakesink"); diff --git a/tests/check/elements/fakesrc.c b/tests/check/elements/fakesrc.c index ee35321..2654a38 100644 --- a/tests/check/elements/fakesrc.c +++ b/tests/check/elements/fakesrc.c @@ -24,16 +24,16 @@ #include -gboolean have_eos = FALSE; +static gboolean have_eos = FALSE; -GstPad *mysinkpad; +static GstPad *mysinkpad; static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); -gboolean +static gboolean event_func (GstPad * pad, GstEvent * event) { if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) { @@ -46,8 +46,8 @@ event_func (GstPad * pad, GstEvent * event) return FALSE; } -GstElement * -setup_fakesrc () +static GstElement * +setup_fakesrc (void) { GstElement *fakesrc; @@ -59,7 +59,7 @@ setup_fakesrc () return fakesrc; } -void +static void cleanup_fakesrc (GstElement * fakesrc) { gst_pad_set_active (mysinkpad, FALSE); @@ -236,7 +236,7 @@ GST_START_TEST (test_no_preroll) GST_END_TEST; -Suite * +static Suite * fakesrc_suite (void) { Suite *s = suite_create ("fakesrc"); diff --git a/tests/check/elements/fdsrc.c b/tests/check/elements/fdsrc.c index e86dc8e..7236356 100644 --- a/tests/check/elements/fdsrc.c +++ b/tests/check/elements/fdsrc.c @@ -27,16 +27,16 @@ #include -gboolean have_eos = FALSE; +static gboolean have_eos = FALSE; -GstPad *mysinkpad; +static GstPad *mysinkpad; static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); -gboolean +static gboolean event_func (GstPad * pad, GstEvent * event) { if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) { @@ -49,8 +49,8 @@ event_func (GstPad * pad, GstEvent * event) return FALSE; } -GstElement * -setup_fdsrc () +static GstElement * +setup_fdsrc (void) { GstElement *fdsrc; @@ -62,7 +62,7 @@ setup_fdsrc () return fdsrc; } -void +static void cleanup_fdsrc (GstElement * fdsrc) { gst_pad_set_active (mysinkpad, FALSE); @@ -180,7 +180,7 @@ GST_START_TEST (test_seeking) GST_END_TEST; -Suite * +static Suite * fdsrc_suite (void) { Suite *s = suite_create ("fdsrc"); diff --git a/tests/check/elements/filesink.c b/tests/check/elements/filesink.c index b75ac39..d0a059d 100644 --- a/tests/check/elements/filesink.c +++ b/tests/check/elements/filesink.c @@ -34,9 +34,7 @@ #include -gboolean have_eos = FALSE; - -GstPad *mysrcpad; +static GstPad *mysrcpad; static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, @@ -44,7 +42,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_CAPS_ANY); static GstElement * -setup_filesink () +setup_filesink (void) { GstElement *filesink; diff --git a/tests/check/elements/filesrc.c b/tests/check/elements/filesrc.c index 1c8c1a1..2c4bb01 100644 --- a/tests/check/elements/filesrc.c +++ b/tests/check/elements/filesrc.c @@ -36,7 +36,7 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); -gboolean +static gboolean event_func (GstPad * pad, GstEvent * event) { gboolean res = TRUE; @@ -54,7 +54,7 @@ event_func (GstPad * pad, GstEvent * event) return res; } -void +static void wait_eos (void) { g_mutex_lock (event_mutex); @@ -66,8 +66,8 @@ wait_eos (void) g_mutex_unlock (event_mutex); } -GstElement * -setup_filesrc () +static GstElement * +setup_filesrc (void) { GstElement *filesrc; @@ -83,7 +83,7 @@ setup_filesrc () return filesrc; } -void +static void cleanup_filesrc (GstElement * filesrc) { gst_pad_set_active (mysinkpad, FALSE); @@ -376,7 +376,7 @@ GST_START_TEST (test_uri_interface) GST_END_TEST; -Suite * +static Suite * filesrc_suite (void) { Suite *s = suite_create ("filesrc"); diff --git a/tests/check/elements/identity.c b/tests/check/elements/identity.c index 536cfb0..b845466 100644 --- a/tests/check/elements/identity.c +++ b/tests/check/elements/identity.c @@ -24,12 +24,12 @@ #include -gboolean have_eos = FALSE; +static gboolean have_eos = FALSE; /* For ease of programming we use globals to keep refs for our floating * src and sink pads we create; otherwise we always have to do get_pad, * get_peer, and then remove references in every test function */ -GstPad *mysrcpad, *mysinkpad; +static GstPad *mysrcpad, *mysinkpad; static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", @@ -41,7 +41,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); -gboolean +static gboolean event_func (GstPad * pad, GstEvent * event) { if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) { @@ -54,8 +54,8 @@ event_func (GstPad * pad, GstEvent * event) return FALSE; } -GstElement * -setup_identity () +static GstElement * +setup_identity (void) { GstElement *identity; @@ -71,7 +71,7 @@ setup_identity () return identity; } -void +static void cleanup_identity (GstElement * identity) { GST_DEBUG ("cleanup_identity"); @@ -112,7 +112,7 @@ GST_START_TEST (test_one_buffer) GST_END_TEST; -Suite * +static Suite * identity_suite (void) { Suite *s = suite_create ("identity"); diff --git a/tests/check/elements/tee.c b/tests/check/elements/tee.c index 5b37833..ae68268 100644 --- a/tests/check/elements/tee.c +++ b/tests/check/elements/tee.c @@ -164,7 +164,7 @@ GST_START_TEST (test_stress) GST_END_TEST; -Suite * +static Suite * tee_suite (void) { Suite *s = suite_create ("tee"); diff --git a/tests/check/generic/sinks.c b/tests/check/generic/sinks.c index 8792916..ee33e8f 100644 --- a/tests/check/generic/sinks.c +++ b/tests/check/generic/sinks.c @@ -1244,7 +1244,7 @@ GST_START_TEST (test_async_done_eos) GST_END_TEST; /* test: try changing state of sinks */ -Suite * +static Suite * gst_sinks_suite (void) { Suite *s = suite_create ("Sinks"); diff --git a/tests/check/generic/states.c b/tests/check/generic/states.c index 6b5ab99..c6ebd6b 100644 --- a/tests/check/generic/states.c +++ b/tests/check/generic/states.c @@ -31,7 +31,7 @@ static GList *elements = NULL; static void -setup () +setup (void) { GList *features, *f; GList *plugins, *p; @@ -88,7 +88,7 @@ setup () } static void -teardown () +teardown (void) { GList *e; @@ -204,7 +204,7 @@ GST_START_TEST (test_state_changes_down_seq) GST_END_TEST; -Suite * +static Suite * states_suite (void) { Suite *s = suite_create ("states"); diff --git a/tests/check/gst/gst.c b/tests/check/gst/gst.c index 594c2ba..92f21b7 100644 --- a/tests/check/gst/gst.c +++ b/tests/check/gst/gst.c @@ -92,7 +92,7 @@ GST_START_TEST (test_version) GST_END_TEST; -Suite * +static Suite * gst_suite (void) { Suite *s = suite_create ("Gst"); diff --git a/tests/check/gst/gstabi.c b/tests/check/gst/gstabi.c index 9a98208..1d96ef6 100644 --- a/tests/check/gst/gstabi.c +++ b/tests/check/gst/gstabi.c @@ -58,7 +58,7 @@ GST_START_TEST (test_ABI) GST_END_TEST; -Suite * +static Suite * gstabi_suite (void) { Suite *s = suite_create ("GstABI"); diff --git a/tests/check/gst/gstbin.c b/tests/check/gst/gstbin.c index 215cd83..2e2bcd9 100644 --- a/tests/check/gst/gstbin.c +++ b/tests/check/gst/gstbin.c @@ -891,7 +891,7 @@ GST_START_TEST (test_iterate_sorted) GST_END_TEST; -Suite * +static Suite * gst_bin_suite (void) { Suite *s = suite_create ("GstBin"); diff --git a/tests/check/gst/gstbus.c b/tests/check/gst/gstbus.c index 35c672f..544479e 100644 --- a/tests/check/gst/gstbus.c +++ b/tests/check/gst/gstbus.c @@ -45,7 +45,7 @@ pound_bus_with_messages (gpointer data) } static void -pull_messages () +pull_messages (void) { GstMessage *m; const GstStructure *s; @@ -428,7 +428,7 @@ GST_START_TEST (test_timed_pop_thread) GST_END_TEST; -Suite * +static Suite * gst_bus_suite (void) { Suite *s = suite_create ("GstBus"); diff --git a/tests/check/gst/gstcaps.c b/tests/check/gst/gstcaps.c index 7cdee34..dddc108 100644 --- a/tests/check/gst/gstcaps.c +++ b/tests/check/gst/gstcaps.c @@ -580,7 +580,7 @@ GST_START_TEST (test_intersect) GST_END_TEST; -Suite * +static Suite * gst_caps_suite (void) { Suite *s = suite_create ("GstCaps"); diff --git a/tests/check/gst/gstelement.c b/tests/check/gst/gstelement.c index 22de7dd..3ec98e6 100644 --- a/tests/check/gst/gstelement.c +++ b/tests/check/gst/gstelement.c @@ -205,7 +205,7 @@ GST_START_TEST (test_class) GST_END_TEST; -Suite * +static Suite * gst_element_suite (void) { Suite *s = suite_create ("GstElement"); diff --git a/tests/check/gst/gstevent.c b/tests/check/gst/gstevent.c index a462813..82ed837 100644 --- a/tests/check/gst/gstevent.c +++ b/tests/check/gst/gstevent.c @@ -268,9 +268,9 @@ GST_START_TEST (create_events) GST_END_TEST; -GTimeVal sent_event_time; -GstEvent *got_event_before_q, *got_event_after_q; -GTimeVal got_event_time; +static GTimeVal sent_event_time; +static GstEvent *got_event_before_q, *got_event_after_q; +static GTimeVal got_event_time; static gboolean event_probe (GstPad * pad, GstMiniObject ** data, gpointer user_data) @@ -478,7 +478,7 @@ GST_START_TEST (send_custom_events) GST_END_TEST; -Suite * +static Suite * gst_event_suite (void) { Suite *s = suite_create ("GstEvent"); diff --git a/tests/check/gst/gstghostpad.c b/tests/check/gst/gstghostpad.c index 1e8ba08..0cada75 100644 --- a/tests/check/gst/gstghostpad.c +++ b/tests/check/gst/gstghostpad.c @@ -602,7 +602,7 @@ GST_START_TEST (test_ghost_pads_new_no_target_from_template) GST_END_TEST; -Suite * +static Suite * gst_ghost_pad_suite (void) { Suite *s = suite_create ("GstGhostPad"); diff --git a/tests/check/gst/gstiterator.c b/tests/check/gst/gstiterator.c index 288f0cd..8d78c81 100644 --- a/tests/check/gst/gstiterator.c +++ b/tests/check/gst/gstiterator.c @@ -167,7 +167,7 @@ GST_START_TEST (test_fold) GST_END_TEST; -Suite * +static Suite * gst_iterator_suite (void) { Suite *s = suite_create ("GstIterator"); diff --git a/tests/check/gst/gstmessage.c b/tests/check/gst/gstmessage.c index 6ddbf5d..b2a03f2 100644 --- a/tests/check/gst/gstmessage.c +++ b/tests/check/gst/gstmessage.c @@ -192,7 +192,7 @@ GST_START_TEST (test_parsing) GST_END_TEST; -Suite * +static Suite * gst_message_suite (void) { Suite *s = suite_create ("GstMessage"); diff --git a/tests/check/gst/gstminiobject.c b/tests/check/gst/gstminiobject.c index 33a2bb3..e4487bd 100644 --- a/tests/check/gst/gstminiobject.c +++ b/tests/check/gst/gstminiobject.c @@ -95,11 +95,11 @@ GST_START_TEST (test_make_writable) GST_END_TEST; -gint num_threads = 10; -gint refs_per_thread = 10000; +static gint num_threads = 10; +static gint refs_per_thread = 10000; /* test thread-safe refcounting of GstMiniObject */ -void +static void thread_ref (GstMiniObject * mobj) { int j; @@ -135,7 +135,7 @@ GST_START_TEST (test_ref_threaded) GST_END_TEST; -void +static void thread_unref (GstMiniObject * mobj) { int j; @@ -191,9 +191,10 @@ enum PROP_BUFFER = 1 }; -G_DEFINE_TYPE (MyFoo, my_foo, G_TYPE_OBJECT) +G_DEFINE_TYPE (MyFoo, my_foo, G_TYPE_OBJECT); - static void my_foo_init (MyFoo * foo) +static void +my_foo_init (MyFoo * foo) { } @@ -270,7 +271,7 @@ GST_START_TEST (test_value_collection) GST_END_TEST; -Suite * +static Suite * gst_mini_object_suite (void) { Suite *s = suite_create ("GstMiniObject"); diff --git a/tests/check/gst/gstobject.c b/tests/check/gst/gstobject.c index 7f7e931..b5a3ab7 100644 --- a/tests/check/gst/gstobject.c +++ b/tests/check/gst/gstobject.c @@ -38,12 +38,12 @@ struct _GstFakeObjectClass GstObjectClass parent_class; }; -GType _gst_fake_object_type = 0; +static GType _gst_fake_object_type = 0; //static GstObjectClass *parent_class = NULL; //static guint gst_fake_object_signals[LAST_SIGNAL] = { 0 }; -GType +static GType gst_fake_object_get_type (void) { if (!_gst_fake_object_type) { @@ -75,7 +75,8 @@ GST_START_TEST (test_fail_abstract_new) fail_unless (object == NULL, "Created an instance of abstract GstObject"); } -GST_END_TEST +GST_END_TEST; + /* g_object_new on GstFakeObject should succeed */ GST_START_TEST (test_fake_object_new) { @@ -88,7 +89,8 @@ GST_START_TEST (test_fake_object_new) gst_object_unref (object); } -GST_END_TEST +GST_END_TEST; + /* GstFakeObject name tests */ GST_START_TEST (test_fake_object_name) { @@ -129,9 +131,11 @@ GST_START_TEST (test_fake_object_name) gst_object_unref (object); } -GST_END_TEST +GST_END_TEST; + /* thread function for threaded name change test */ - gpointer thread_name_object (GstObject * object) +static gpointer +thread_name_object (GstObject * object) { gchar *thread_id = g_strdup_printf ("%p", g_thread_self ()); @@ -227,18 +231,19 @@ GST_START_TEST (test_fake_object_name_threaded_right) gst_object_unref (object); } -GST_END_TEST +GST_END_TEST; /* * main thread creates lots of objects * child threads sets default names on objects * then main thread checks uniqueness of object names */ - GList * object_list = NULL; -gint num_objects = 1000; -gint num_threads = 5; + +static GList *object_list = NULL; +static gint num_objects = 1000; +static gint num_threads = 5; /* thread function for threaded default name change test */ -gpointer +static gpointer thread_name_object_default (int *i) { int j; @@ -333,7 +338,8 @@ GST_START_TEST (test_fake_object_name_threaded_unique) g_list_foreach (object_list, (GFunc) g_object_unref, NULL); } -GST_END_TEST +GST_END_TEST; + /* parentage test on GstFakeObject */ GST_START_TEST (test_fake_object_parentage) { @@ -409,7 +415,8 @@ GST_START_TEST (test_fake_object_parentage) gst_object_unref (object2); } -GST_END_TEST +GST_END_TEST; + /* parentage test dispose on GstFakeObject, since our testcase * does not handle the parent relation completely, the parent does * not hold a ref to the child, we cannot dispose the parent to @@ -438,9 +445,12 @@ GST_START_TEST (test_fake_object_parentage_dispose) gst_object_unref (object2); } -GST_END_TEST +GST_END_TEST; + /* test: try renaming a parented object, make sure it fails */ - Suite * gst_object_suite (void) + +static Suite * +gst_object_suite (void) { Suite *s = suite_create ("GstObject"); TCase *tc_chain = tcase_create ("general"); diff --git a/tests/check/gst/gstpad.c b/tests/check/gst/gstpad.c index f5e78a4..8c67a43 100644 --- a/tests/check/gst/gstpad.c +++ b/tests/check/gst/gstpad.c @@ -63,9 +63,9 @@ GST_END_TEST; /* threaded link/unlink */ /* use globals */ -GstPad *src, *sink; +static GstPad *src, *sink; -void +static void thread_link_unlink (gpointer data) { THREAD_START (); @@ -603,7 +603,7 @@ GST_START_TEST (test_get_caps_must_be_copy) GST_END_TEST; -Suite * +static Suite * gst_pad_suite (void) { Suite *s = suite_create ("GstPad"); diff --git a/tests/check/gst/gstplugin.c b/tests/check/gst/gstplugin.c index c7463ed..3ca5680 100644 --- a/tests/check/gst/gstplugin.c +++ b/tests/check/gst/gstplugin.c @@ -356,7 +356,7 @@ GST_START_TEST (test_version_checks) GST_END_TEST; -Suite * +static Suite * gst_plugin_suite (void) { Suite *s = suite_create ("GstPlugin"); diff --git a/tests/check/gst/gstpoll.c b/tests/check/gst/gstpoll.c index 204a21f..24052cc 100644 --- a/tests/check/gst/gstpoll.c +++ b/tests/check/gst/gstpoll.c @@ -357,7 +357,7 @@ GST_START_TEST (test_poll_wait_select) GST_END_TEST; -Suite * +static Suite * gst_poll_suite (void) { Suite *s = suite_create ("GstPoll"); diff --git a/tests/check/gst/gstquery.c b/tests/check/gst/gstquery.c index ba3bf75..a626c6c 100644 --- a/tests/check/gst/gstquery.c +++ b/tests/check/gst/gstquery.c @@ -249,7 +249,7 @@ GST_START_TEST (test_queries) GST_END_TEST; -Suite * +static Suite * gst_query_suite (void) { Suite *s = suite_create ("GstQuery"); diff --git a/tests/check/gst/gstsegment.c b/tests/check/gst/gstsegment.c index bc3d0b6..c6a13cf 100644 --- a/tests/check/gst/gstsegment.c +++ b/tests/check/gst/gstsegment.c @@ -1624,7 +1624,7 @@ GST_START_TEST (segment_newsegment_accum2) GST_END_TEST; -Suite * +static Suite * gst_segment_suite (void) { Suite *s = suite_create ("GstSegment"); diff --git a/tests/check/gst/gststructure.c b/tests/check/gst/gststructure.c index 15c6719..c4b3ed7 100644 --- a/tests/check/gst/gststructure.c +++ b/tests/check/gst/gststructure.c @@ -365,7 +365,7 @@ GST_START_TEST (test_structure_nested) GST_END_TEST; -Suite * +static Suite * gst_structure_suite (void) { Suite *s = suite_create ("GstStructure"); diff --git a/tests/check/gst/gstsystemclock.c b/tests/check/gst/gstsystemclock.c index c7a49f3..a570d8c 100644 --- a/tests/check/gst/gstsystemclock.c +++ b/tests/check/gst/gstsystemclock.c @@ -40,7 +40,8 @@ GST_START_TEST (test_range) fail_unless (time2 == GST_TIME_AS_MSECONDS (time)); } -GST_END_TEST +GST_END_TEST; + GST_START_TEST (test_signedness) { GstClockTime time[] = { 0, 1, G_MAXUINT64 / GST_SECOND }; @@ -56,9 +57,10 @@ GST_START_TEST (test_signedness) } } -GST_END_TEST +GST_END_TEST; + #define TIME_UNIT (GST_SECOND / 5) - static void +static void gst_clock_debug (GstClock * clock) { GstClockTime time; @@ -174,7 +176,8 @@ GST_START_TEST (test_single_shot) g_usleep (TIME_UNIT / (2 * 1000)); } -GST_END_TEST +GST_END_TEST; + GST_START_TEST (test_periodic_shot) { GstClock *clock; @@ -236,7 +239,8 @@ GST_START_TEST (test_periodic_shot) gst_clock_id_unref (id); } -GST_END_TEST +GST_END_TEST; + GST_START_TEST (test_async_order) { GstClock *clock; @@ -273,7 +277,8 @@ GST_START_TEST (test_async_order) g_list_free (cb_list); } -GST_END_TEST +GST_END_TEST; + GST_START_TEST (test_periodic_multi) { GstClock *clock; @@ -316,7 +321,8 @@ GST_START_TEST (test_periodic_multi) fail_unless (gst_clock_get_time (clock) < base + 4 * TIME_UNIT); } -GST_END_TEST +GST_END_TEST; + GST_START_TEST (test_diff) { GstClockTime time1[] = { 0, (GstClockTime) - 1, 0, 1, 2 * GST_SECOND, @@ -332,10 +338,11 @@ GST_START_TEST (test_diff) } } -GST_END_TEST +GST_END_TEST; + /* test if a blocking wait, unblocked by an async entry continues to be * scheduled */ - typedef struct +typedef struct { GstClock *clock; GstClockID id; @@ -400,7 +407,9 @@ GST_START_TEST (test_mixed) gst_object_unref (info.clock); } -GST_END_TEST Suite * +GST_END_TEST; + +static Suite * gst_systemclock_suite (void) { Suite *s = suite_create ("GstSystemClock"); diff --git a/tests/check/gst/gsttask.c b/tests/check/gst/gsttask.c index 65e1a38..da307cc 100644 --- a/tests/check/gst/gsttask.c +++ b/tests/check/gst/gsttask.c @@ -184,7 +184,7 @@ GST_START_TEST (test_create) GST_END_TEST; -Suite * +static Suite * gst_task_suite (void) { Suite *s = suite_create ("GstTask"); diff --git a/tests/check/gst/gstutils.c b/tests/check/gst/gstutils.c index 413885d..933a567 100644 --- a/tests/check/gst/gstutils.c +++ b/tests/check/gst/gstutils.c @@ -590,7 +590,7 @@ GST_START_TEST (test_set_value_from_string) GST_END_TEST; -Suite * +static Suite * gst_utils_suite (void) { Suite *s = suite_create ("GstUtils"); diff --git a/tests/check/gst/gstvalue.c b/tests/check/gst/gstvalue.c index 192c80e..7bfb6c6 100644 --- a/tests/check/gst/gstvalue.c +++ b/tests/check/gst/gstvalue.c @@ -1618,7 +1618,7 @@ GST_START_TEST (test_serialize_deserialize_format_enum) GST_END_TEST; -Suite * +static Suite * gst_value_suite (void) { Suite *s = suite_create ("GstValue"); diff --git a/tests/check/gst/struct_hppa.h b/tests/check/gst/struct_hppa.h index 64ee4f0..5d2b9db 100644 --- a/tests/check/gst/struct_hppa.h +++ b/tests/check/gst/struct_hppa.h @@ -1,4 +1,4 @@ -GstCheckABIStruct list[] = { +static GstCheckABIStruct list[] = { {"GstBin", sizeof (GstBin), 192}, {"GstBinClass", sizeof (GstBinClass), 288}, {"GstBuffer", sizeof (GstBuffer), 88}, diff --git a/tests/check/gst/struct_i386.h b/tests/check/gst/struct_i386.h index f77f9cd..1fe5c64 100644 --- a/tests/check/gst/struct_i386.h +++ b/tests/check/gst/struct_i386.h @@ -1,4 +1,4 @@ -GstCheckABIStruct list[] = { +static GstCheckABIStruct list[] = { {"GstBin", sizeof (GstBin), 184}, {"GstBinClass", sizeof(GstBinClass), 288}, {"GstBuffer", sizeof(GstBuffer), 80}, diff --git a/tests/check/gst/struct_ppc32.h b/tests/check/gst/struct_ppc32.h index 2f95f1d..4b943f4 100644 --- a/tests/check/gst/struct_ppc32.h +++ b/tests/check/gst/struct_ppc32.h @@ -1,4 +1,4 @@ -GstCheckABIStruct list[] = { +static GstCheckABIStruct list[] = { {"GstBin", sizeof (GstBin), 192}, {"GstBinClass", sizeof (GstBinClass), 288}, {"GstBuffer", sizeof (GstBuffer), 88}, diff --git a/tests/check/gst/struct_ppc64.h b/tests/check/gst/struct_ppc64.h index 477ce03..02de86d 100644 --- a/tests/check/gst/struct_ppc64.h +++ b/tests/check/gst/struct_ppc64.h @@ -1,4 +1,4 @@ -GstCheckABIStruct list[] = { +static GstCheckABIStruct list[] = { {"GstBin", sizeof (GstBin), 336}, {"GstBinClass", sizeof (GstBinClass), 568}, {"GstBuffer", sizeof (GstBuffer), 120} , diff --git a/tests/check/gst/struct_x86_64.h b/tests/check/gst/struct_x86_64.h index 477ce03..02de86d 100644 --- a/tests/check/gst/struct_x86_64.h +++ b/tests/check/gst/struct_x86_64.h @@ -1,4 +1,4 @@ -GstCheckABIStruct list[] = { +static GstCheckABIStruct list[] = { {"GstBin", sizeof (GstBin), 336}, {"GstBinClass", sizeof (GstBinClass), 568}, {"GstBuffer", sizeof (GstBuffer), 120} , diff --git a/tests/check/libs/adapter.c b/tests/check/libs/adapter.c index e236b63..e45c210 100644 --- a/tests/check/libs/adapter.c +++ b/tests/check/libs/adapter.c @@ -172,7 +172,7 @@ GST_START_TEST (test_take3) GST_END_TEST; static GstAdapter * -create_and_fill_adapter () +create_and_fill_adapter (void) { GstAdapter *adapter; gint i, j; @@ -244,7 +244,7 @@ GST_START_TEST (test_take_buf_order) GST_END_TEST; -Suite * +static Suite * gst_adapter_suite (void) { Suite *s = suite_create ("adapter"); diff --git a/tests/check/libs/basesrc.c b/tests/check/libs/basesrc.c index 0b5a51c..f2549f2 100644 --- a/tests/check/libs/basesrc.c +++ b/tests/check/libs/basesrc.c @@ -482,7 +482,7 @@ GST_START_TEST (basesrc_eos_events_pull_live_eos) GST_END_TEST; -Suite * +static Suite * gst_basesrc_suite (void) { Suite *s = suite_create ("GstBaseSrc"); diff --git a/tests/check/libs/controller.c b/tests/check/libs/controller.c index f89ed47..a364fee 100644 --- a/tests/check/libs/controller.c +++ b/tests/check/libs/controller.c @@ -972,7 +972,7 @@ GST_START_TEST (controller_interpolation_linear_value_array) GstElement *elem; gboolean res; GValue val_ulong = { 0, }; - GstValueArray values = { 0, }; + GstValueArray values = { NULL, }; gst_controller_init (NULL, NULL); diff --git a/tests/check/libs/gdp.c b/tests/check/libs/gdp.c index 60ca2d6..c0edf24 100644 --- a/tests/check/libs/gdp.c +++ b/tests/check/libs/gdp.c @@ -409,7 +409,7 @@ GST_END_TEST; #endif -Suite * +static Suite * gst_dp_suite (void) { Suite *s = suite_create ("data protocol"); diff --git a/tests/check/libs/gstnetclientclock.c b/tests/check/libs/gstnetclientclock.c index 2deb924..f72109a 100644 --- a/tests/check/libs/gstnetclientclock.c +++ b/tests/check/libs/gstnetclientclock.c @@ -110,7 +110,7 @@ GST_START_TEST (test_functioning) GST_END_TEST; -Suite * +static Suite * gst_net_client_clock_suite (void) { Suite *s = suite_create ("GstNetClientClock"); diff --git a/tests/check/libs/gstnettimeprovider.c b/tests/check/libs/gstnettimeprovider.c index e0476a3..94fd170 100644 --- a/tests/check/libs/gstnettimeprovider.c +++ b/tests/check/libs/gstnettimeprovider.c @@ -109,7 +109,7 @@ GST_START_TEST (test_functioning) GST_END_TEST; -Suite * +static Suite * gst_net_time_provider_suite (void) { Suite *s = suite_create ("GstNetTimeProvider"); diff --git a/tests/check/libs/libsabi.c b/tests/check/libs/libsabi.c index 7fce1f3..4881526 100644 --- a/tests/check/libs/libsabi.c +++ b/tests/check/libs/libsabi.c @@ -71,7 +71,7 @@ GST_START_TEST (test_ABI) GST_END_TEST; -Suite * +static Suite * libsabi_suite (void) { Suite *s = suite_create ("LibsABI"); diff --git a/tests/check/libs/struct_hppa.h b/tests/check/libs/struct_hppa.h index 3dd7315..163f8a7 100644 --- a/tests/check/libs/struct_hppa.h +++ b/tests/check/libs/struct_hppa.h @@ -1,4 +1,4 @@ -GstCheckABIStruct list[] = { +static GstCheckABIStruct list[] = { {"GstAdapter", sizeof (GstAdapter), 52}, {"GstAdapterClass", sizeof (GstAdapterClass), 84}, {"GstBaseSink", sizeof (GstBaseSink), 408}, diff --git a/tests/check/libs/struct_i386.h b/tests/check/libs/struct_i386.h index 94a30ee..7717fdc 100644 --- a/tests/check/libs/struct_i386.h +++ b/tests/check/libs/struct_i386.h @@ -1,4 +1,4 @@ -GstCheckABIStruct list[] = { +static GstCheckABIStruct list[] = { {"GstAdapter", sizeof(GstAdapter), 52}, {"GstAdapterClass", sizeof(GstAdapterClass), 84}, {"GstBaseSink", sizeof(GstBaseSink), 384}, diff --git a/tests/check/libs/struct_ppc32.h b/tests/check/libs/struct_ppc32.h index a3ca167..abf92dc 100644 --- a/tests/check/libs/struct_ppc32.h +++ b/tests/check/libs/struct_ppc32.h @@ -1,4 +1,4 @@ -GstCheckABIStruct list[] = { +static GstCheckABIStruct list[] = { {"GstAdapter", sizeof (GstAdapter), 52}, {"GstAdapterClass", sizeof (GstAdapterClass), 84}, {"GstBaseSink", sizeof (GstBaseSink), 408}, diff --git a/tests/check/libs/struct_ppc64.h b/tests/check/libs/struct_ppc64.h index 353ceaa..21654e8 100644 --- a/tests/check/libs/struct_ppc64.h +++ b/tests/check/libs/struct_ppc64.h @@ -1,4 +1,4 @@ -GstCheckABIStruct list[] = { +static GstCheckABIStruct list[] = { {"GstAdapter", sizeof (GstAdapter), 88} , {"GstAdapterClass", sizeof (GstAdapterClass), 168} diff --git a/tests/check/libs/struct_x86_64.h b/tests/check/libs/struct_x86_64.h index 353ceaa..21654e8 100644 --- a/tests/check/libs/struct_x86_64.h +++ b/tests/check/libs/struct_x86_64.h @@ -1,4 +1,4 @@ -GstCheckABIStruct list[] = { +static GstCheckABIStruct list[] = { {"GstAdapter", sizeof (GstAdapter), 88} , {"GstAdapterClass", sizeof (GstAdapterClass), 168} diff --git a/tests/check/pipelines/cleanup.c b/tests/check/pipelines/cleanup.c index 1e2a0b2..1446888 100644 --- a/tests/check/pipelines/cleanup.c +++ b/tests/check/pipelines/cleanup.c @@ -102,7 +102,7 @@ GST_START_TEST (test_pipeline_unref) GST_END_TEST; -Suite * +static Suite * cleanup_suite (void) { Suite *s = suite_create ("Pipeline cleanup"); diff --git a/tests/check/pipelines/simple-launch-lines.c b/tests/check/pipelines/simple-launch-lines.c index 1a80295..e0d2ba8 100644 --- a/tests/check/pipelines/simple-launch-lines.c +++ b/tests/check/pipelines/simple-launch-lines.c @@ -319,7 +319,7 @@ GST_START_TEST (test_stop_from_app) GST_END_TEST; -Suite * +static Suite * simple_launch_lines_suite (void) { Suite *s = suite_create ("Pipelines"); diff --git a/tests/check/pipelines/stress.c b/tests/check/pipelines/stress.c index 7d8ddf9..9e349ba 100644 --- a/tests/check/pipelines/stress.c +++ b/tests/check/pipelines/stress.c @@ -115,7 +115,7 @@ GST_START_TEST (test_stress) GST_END_TEST; -Suite * +static Suite * stress_suite (void) { Suite *s = suite_create ("stress"); diff --git a/win32/common/libgstreamer.def b/win32/common/libgstreamer.def index b7c28c5..db5cfff 100644 --- a/win32/common/libgstreamer.def +++ b/win32/common/libgstreamer.def @@ -655,6 +655,7 @@ EXPORTS gst_poll_fd_ctl_write gst_poll_fd_has_closed gst_poll_fd_has_error + gst_poll_fd_init gst_poll_free gst_poll_get_mode gst_poll_mode_get_type -- 2.7.4