From 1998871b391cb43d1c681456f851a193f8bee15d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 29 Feb 2008 12:41:33 +0000 Subject: [PATCH] gdp: Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static... Original commit message from CVS: * gst/gstconfig.h.in: * libs/gst/base/gstcollectpads.c: (gst_collect_pads_read_buffer): * libs/gst/check/gstcheck.c: (gst_check_log_message_func), (gst_check_log_critical_func), (gst_check_drop_buffers), (gst_check_element_push_buffer_list): * libs/gst/controller/gstcontroller.c: (gst_controller_get), (gst_controller_get_type): * libs/gst/controller/gsthelper.c: (gst_object_control_properties), (gst_object_get_controller), (gst_object_get_control_source): * libs/gst/controller/gstinterpolationcontrolsource.c: (gst_interpolation_control_source_new): * libs/gst/controller/gstlfocontrolsource.c: (gst_lfo_control_source_new): * libs/gst/dataprotocol/dataprotocol.c: (gst_dp_event_from_packet_0_2): * plugins/elements/gstfdsrc.c: * plugins/elements/gstmultiqueue.c: * plugins/elements/gsttee.c: * plugins/elements/gsttypefindelement.c: * plugins/indexers/gstfileindex.c: (_file_index_id_save_xml), (gst_file_index_add_association): * plugins/indexers/gstmemindex.c: * tests/benchmarks/gstpollstress.c: (mess_some_more): * tests/check/elements/queue.c: (setup_queue): * tests/check/gst/gstpipeline.c: * tests/check/libs/collectpads.c: (setup), (teardown), (gst_collect_pads_suite): * tests/examples/adapter/adapter_test.c: * tests/examples/metadata/read-metadata.c: (make_pipeline): * tests/examples/xml/createxml.c: * tests/examples/xml/runxml.c: * tools/gst-inspect.c: * tools/gst-run.c: Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static, using NULL instead of 0 for pointers, not using variable sized arrays on the stack, moving variable declarations to the beginning of a block and using "foo (void)" instead of "foo ()" for declarations. --- gst/gdp/dataprotocol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/gdp/dataprotocol.c b/gst/gdp/dataprotocol.c index b5dea2a..8bdb9bc 100644 --- a/gst/gdp/dataprotocol.c +++ b/gst/gdp/dataprotocol.c @@ -654,7 +654,7 @@ gst_dp_event_from_packet_0_2 (guint header_length, const guint8 * header, switch (type) { case GST_EVENT_UNKNOWN: GST_WARNING ("Unknown event, ignoring"); - return FALSE; + return NULL; case GST_EVENT_EOS: case GST_EVENT_FLUSH_START: case GST_EVENT_FLUSH_STOP: @@ -690,10 +690,10 @@ gst_dp_event_from_packet_0_2 (guint header_length, const guint8 * header, case GST_EVENT_NAVIGATION: case GST_EVENT_TAG: GST_WARNING ("Unhandled event type %d, ignoring", type); - return FALSE; + return NULL; default: GST_WARNING ("Unknown event type %d, ignoring", type); - return FALSE; + return NULL; } return event; -- 2.7.4