Make code safe for -Wredundant-decls
authorBenjamin Otte <otte@redhat.com>
Tue, 2 Mar 2010 22:51:18 +0000 (23:51 +0100)
committerBenjamin Otte <otte@redhat.com>
Wed, 10 Mar 2010 19:45:33 +0000 (20:45 +0100)
Adds that warning to configure.ac

Includes a tiny change of the GST_BOILERPLATE_FULL() macro:
The get_type() function is no longer declared before being defined.

https://bugzilla.gnome.org/show_bug.cgi?id=611692

30 files changed:
configure.ac
docs/gst/gstreamer-sections.txt
gst/gstbus.c
gst/gstclock.c
gst/gstelementfactory.c
gst/gstindex.c
gst/gstindexfactory.c
gst/gstinfo.c
gst/gstinfo.h
gst/gstobject.c
gst/gstpipeline.c
gst/gstplugin.c
gst/gstregistry.c
gst/gstregistrybinary.h
gst/gstsystemclock.c
gst/gsttask.c
gst/gsttaskpool.c
gst/gstutils.h
gst/gstxml.c
gst/parse/grammar.y
libs/gst/base/gstcollectpads.c
libs/gst/controller/gstcontrolsource.c
libs/gst/controller/gstinterpolationcontrolsource.c
libs/gst/controller/gstlfocontrolsource.c
libs/gst/dataprotocol/dp-private.h
tests/check/elements/fakesink.c
tests/check/gst/gstparamspecs.c
tests/check/gst/gsttagsetter.c
tests/check/libs/test_transform.c
tests/examples/streams/testrtpool.c

index 2de8b65..29706b0 100644 (file)
@@ -578,7 +578,7 @@ GST_PKG_DEPS="glib-2.0, gobject-2.0, gmodule-no-export-2.0, gthread-2.0"
 AC_SUBST(GST_PKG_DEPS)
 
 dnl define an ERROR_CFLAGS Makefile variable
-AG_GST_SET_ERROR_CFLAGS($GST_GIT)
+AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wredundant-decls])
 
 dnl define correct level for debugging messages
 AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
index 3f593f8..9c53f5e 100644 (file)
@@ -1962,8 +1962,6 @@ gst_registry_find_feature
 gst_registry_lookup_feature
 gst_registry_add_path
 gst_registry_scan_path
-gst_registry_binary_read_cache
-gst_registry_binary_write_cache
 gst_registry_lookup
 gst_registry_remove_feature
 gst_registry_add_feature
index 9991a7d..7a21ab1 100644 (file)
@@ -88,8 +88,6 @@ enum
   LAST_SIGNAL
 };
 
-static void gst_bus_class_init (GstBusClass * klass);
-static void gst_bus_init (GstBus * bus);
 static void gst_bus_dispose (GObject * object);
 
 static void gst_bus_set_main_context (GstBus * bus, GMainContext * ctx);
index e42aa17..925823f 100644 (file)
@@ -167,8 +167,6 @@ G_STMT_START {                                    \
   GST_OBJECT_UNLOCK (clock);                      \
 } G_STMT_END;
 
-static void gst_clock_class_init (GstClockClass * klass);
-static void gst_clock_init (GstClock * clock);
 static void gst_clock_dispose (GObject * object);
 static void gst_clock_finalize (GObject * object);
 
index 3a87790..0483eef 100644 (file)
@@ -69,8 +69,6 @@
 GST_DEBUG_CATEGORY_STATIC (element_factory_debug);
 #define GST_CAT_DEFAULT element_factory_debug
 
-static void gst_element_factory_class_init (GstElementFactoryClass * klass);
-static void gst_element_factory_init (GstElementFactory * factory);
 static void gst_element_factory_finalize (GObject * object);
 void __gst_element_details_clear (GstElementDetails * dp);
 static void gst_element_factory_cleanup (GstElementFactory * factory);
index 0a70c3b..a1c0dd3 100644 (file)
@@ -58,8 +58,6 @@ enum
 GST_DEBUG_CATEGORY_STATIC (index_debug);
 #define GST_CAT_DEFAULT index_debug
 
-static void gst_index_class_init (GstIndexClass * klass);
-static void gst_index_init (GstIndex * index);
 static void gst_index_finalize (GObject * object);
 
 static void gst_index_set_property (GObject * object, guint prop_id,
index 97083d7..a8234ff 100644 (file)
@@ -37,7 +37,6 @@
 #include "gstmarshal.h"
 #include "gstregistry.h"
 
-static void gst_index_factory_class_init (GstIndexFactoryClass * klass);
 static void gst_index_factory_finalize (GObject * object);
 
 static GstPluginFeatureClass *factory_parent_class = NULL;
index e80da43..b136207 100644 (file)
@@ -1493,12 +1493,9 @@ _gst_debug_get_category (const gchar * name)
 static GHashTable *__gst_function_pointers;     /* NULL */
 static GStaticMutex __dbg_functions_mutex = G_STATIC_MUTEX_INIT;
 
-const gchar *
-_gst_debug_nameof_funcptr (GstDebugFuncPtr ptr)
-    G_GNUC_NO_INSTRUMENT;
-
 /* This function MUST NOT return NULL */
-     const gchar *_gst_debug_nameof_funcptr (GstDebugFuncPtr func)
+const gchar *
+_gst_debug_nameof_funcptr (GstDebugFuncPtr func)
 {
   gchar *ptrname;
 
index 6266014..cfd621a 100644 (file)
@@ -1098,7 +1098,7 @@ typedef   void (* GstDebugFuncPtr)        (void);
 void   _gst_debug_register_funcptr     (GstDebugFuncPtr        func,
                                         const gchar *          ptrname);
 G_CONST_RETURN gchar *
-       _gst_debug_nameof_funcptr       (GstDebugFuncPtr        func);
+       _gst_debug_nameof_funcptr       (GstDebugFuncPtr        func) G_GNUC_NO_INSTRUMENT;
 
 /**
  * GST_DEBUG_REGISTER_FUNCPTR:
index 84d1dbb..a8c8c04 100644 (file)
@@ -133,8 +133,6 @@ typedef struct _GstSignalObject GstSignalObject;
 typedef struct _GstSignalObjectClass GstSignalObjectClass;
 
 static GType gst_signal_object_get_type (void);
-static void gst_signal_object_class_init (GstSignalObjectClass * klass);
-static void gst_signal_object_init (GstSignalObject * object);
 
 #ifndef GST_DISABLE_LOADSAVE
 static guint gst_signal_object_signals[SO_LAST_SIGNAL] = { 0 };
index 82f5433..639fe50 100644 (file)
@@ -125,8 +125,6 @@ struct _GstPipelinePrivate
 };
 
 
-static void gst_pipeline_base_init (gpointer g_class);
-
 static void gst_pipeline_dispose (GObject * object);
 static void gst_pipeline_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
index 847dea0..a4af2f3 100644 (file)
@@ -513,8 +513,6 @@ _gst_plugin_fault_handler_setup (void)
 }
 #endif /* HAVE_SIGACTION */
 
-static void _gst_plugin_fault_handler_setup ();
-
 static GStaticMutex gst_plugin_loading_mutex = G_STATIC_MUTEX_INIT;
 
 #define CHECK_PLUGIN_DESC_FIELD(desc,field,fn)                               \
index a4048da..4e27f5d 100644 (file)
 
 #include "gst-i18n-lib.h"
 
-/* needed for fast retrieval of element and typefind factory lists */
-extern GType gst_type_find_factory_get_type (void);
-#define GST_TYPE_TYPE_FIND_FACTORY                 (gst_type_find_factory_get_type())
-extern GType gst_element_factory_get_type (void);
-#define GST_TYPE_ELEMENT_FACTORY                 (gst_element_factory_get_type())
+#include "gst.h"
 
 #ifdef G_OS_WIN32
 #include <windows.h>
index f2e207d..1d9dae6 100644 (file)
@@ -70,10 +70,6 @@ typedef struct _GstBinaryRegistryMagic
   gchar version[GST_MAGIC_BINARY_VERSION_LEN];
 } GstBinaryRegistryMagic;
 
-/* Function prototypes */
-gboolean gst_registry_binary_write_cache(GstRegistry *registry, const char *location);
-gboolean gst_registry_binary_read_cache(GstRegistry *registry, const char *location);
-
 G_END_DECLS
 
 #endif /* !__GST_REGISTRYBINARY_H__ */
index aa48acf..87fb4d7 100644 (file)
@@ -93,8 +93,6 @@ enum
 /* the one instance of the systemclock */
 static GstClock *_the_system_clock = NULL;
 
-static void gst_system_clock_class_init (GstSystemClockClass * klass);
-static void gst_system_clock_init (GstSystemClock * clock);
 static void gst_system_clock_dispose (GObject * object);
 static void gst_system_clock_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
index 9026502..86059ed 100644 (file)
@@ -92,8 +92,6 @@ struct _GstTaskPrivate
   GstTaskPool *pool_id;
 };
 
-static void gst_task_class_init (GstTaskClass * klass);
-static void gst_task_init (GstTask * task);
 static void gst_task_finalize (GObject * object);
 
 static void gst_task_func (GstTask * task);
index c183ab1..992ef31 100644 (file)
@@ -40,8 +40,6 @@
 GST_DEBUG_CATEGORY_STATIC (taskpool_debug);
 #define GST_CAT_DEFAULT (taskpool_debug)
 
-static void gst_task_pool_class_init (GstTaskPoolClass * klass);
-static void gst_task_pool_init (GstTaskPool * pool);
 static void gst_task_pool_finalize (GObject * object);
 
 #define _do_init \
index 89dba5d..74aab3a 100644 (file)
@@ -131,8 +131,6 @@ type_as_function ## _class_init_trampoline (gpointer g_class,               \
   type_as_function ## _class_init ((type ## Class *)g_class);          \
 }                                                                      \
                                                                        \
-GType type_as_function ## _get_type (void);                            \
-                                                                       \
 GType                                                                  \
 type_as_function ## _get_type (void)                                   \
 {                                                                      \
index 04522fd..8c820ef 100644 (file)
@@ -47,8 +47,6 @@ enum
   LAST_SIGNAL
 };
 
-static void gst_xml_class_init (GstXMLClass * klass);
-static void gst_xml_init (GstXML * xml);
 static void gst_xml_dispose (GObject * object);
 
 static void gst_xml_object_loaded (GstObject * private, GstObject * object,
index 81a5e2a..2be3b5f 100644 (file)
@@ -37,7 +37,6 @@ struct yy_buffer_state * _gst_parse_yy_scan_string (char* , yyscan_t);
 void _gst_parse_yypush_buffer_state (void * new_buffer ,yyscan_t yyscanner );
 void _gst_parse_yypop_buffer_state (yyscan_t yyscanner );
 
-
 #ifdef __GST_PARSE_TRACE
 static guint __strings;
 static guint __links;
index f9aa116..5768fff 100644 (file)
@@ -93,8 +93,6 @@ static void gst_collect_pads_clear (GstCollectPads * pads,
 static GstFlowReturn gst_collect_pads_chain (GstPad * pad, GstBuffer * buffer);
 static gboolean gst_collect_pads_event (GstPad * pad, GstEvent * event);
 static void gst_collect_pads_finalize (GObject * object);
-static void gst_collect_pads_init (GstCollectPads * pads,
-    GstCollectPadsClass * g_class);
 static void ref_data (GstCollectData * data);
 static void unref_data (GstCollectData * data);
 static void gst_collect_pads_check_pads_unlocked (GstCollectPads * pads);
index 284c084..0d7d47a 100644 (file)
@@ -49,9 +49,6 @@
 #define GST_CAT_DEFAULT controller_debug
 GST_DEBUG_CATEGORY_EXTERN (GST_CAT_DEFAULT);
 
-static void gst_control_source_class_init (GstControlSourceClass * klass);
-static void gst_control_source_init (GstControlSource * self);
-
 G_DEFINE_ABSTRACT_TYPE (GstControlSource, gst_control_source, G_TYPE_OBJECT);
 
 static GObjectClass *parent_class = NULL;
index 1c7436b..8f7d1d8 100644 (file)
 #define GST_CAT_DEFAULT controller_debug
 GST_DEBUG_CATEGORY_EXTERN (GST_CAT_DEFAULT);
 
-static void gst_interpolation_control_source_init (GstInterpolationControlSource
-    * self);
-static void
-gst_interpolation_control_source_class_init (GstInterpolationControlSourceClass
-    * klass);
-
 G_DEFINE_TYPE (GstInterpolationControlSource, gst_interpolation_control_source,
     GST_TYPE_CONTROL_SOURCE);
 
index f3e1f22..b725500 100644 (file)
@@ -602,10 +602,6 @@ gst_lfo_waveform_get_type (void)
   return gtype;
 }
 
-static void gst_lfo_control_source_init (GstLFOControlSource * self);
-static void
-gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass);
-
 G_DEFINE_TYPE (GstLFOControlSource, gst_lfo_control_source,
     GST_TYPE_CONTROL_SOURCE);
 
index 92a7867..5e54045 100644 (file)
@@ -44,7 +44,6 @@ G_BEGIN_DECLS
 #define GST_DP_HEADER_CRC_HEADER(x)     GST_READ_UINT16_BE (x + 58)
 #define GST_DP_HEADER_CRC_PAYLOAD(x)    GST_READ_UINT16_BE (x + 60)
 
-void gst_dp_init (void);
 void gst_dp_dump_byte_array (guint8 *array, guint length);
 
 G_END_DECLS
index c0b603f..461c024 100644 (file)
@@ -864,6 +864,7 @@ GST_END_TEST;
 typedef GstPushSrc OOBSource;
 typedef GstPushSrcClass OOBSourceClass;
 
+GType oob_source_get_type (void);
 GST_BOILERPLATE (OOBSource, oob_source, GstPushSrc, GST_TYPE_PUSH_SRC);
 
 static void
index 0b6527d..545bce5 100644 (file)
@@ -32,6 +32,7 @@ typedef struct
 
 typedef GstElementClass GstDummyObjClass;
 
+GType gst_dummy_obj_get_type (void);
 GST_BOILERPLATE (GstDummyObj, gst_dummy_obj, GstElement, GST_TYPE_ELEMENT);
 
 static void
index fd230df..48c1308 100644 (file)
@@ -29,6 +29,7 @@ typedef GstElementClass GstDummyEncClass;
 
 static void gst_dummy_enc_add_interfaces (GType enc_type);
 
+GType gst_dummy_enc_get_type (void);
 GST_BOILERPLATE_FULL (GstDummyEnc, gst_dummy_enc, GstElement,
     GST_TYPE_ELEMENT, gst_dummy_enc_add_interfaces);
 
@@ -221,6 +222,7 @@ GST_START_TEST (test_merge_modes_skip_empty)
     }
   }
 }
+
 GST_END_TEST static Suite *
 gst_tag_setter_suite (void)
 {
index 76c7404..9604164 100644 (file)
@@ -55,6 +55,8 @@ struct _GstTestTransClass
   GstBaseTransformClass parent_class;
 };
 
+GType gst_test_trans_get_type (void);
+
 GST_BOILERPLATE (GstTestTrans, gst_test_trans, GstBaseTransform,
     GST_TYPE_BASE_TRANSFORM);
 
index 995a2f5..f2e6fa5 100644 (file)
@@ -21,8 +21,6 @@
 
 #include "testrtpool.h"
 
-static void test_rt_pool_class_init (TestRTPoolClass * klass);
-static void test_rt_pool_init (TestRTPool * pool);
 static void test_rt_pool_finalize (GObject * object);
 
 typedef struct