From 412cc1031482c1607238ab93ec9e10c2aec28555 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 21 Mar 2010 15:17:46 +0100 Subject: [PATCH] Add -Wold-style-definition flag And fix the warnings --- configure.ac | 4 ++-- ext/annodex/gstcmmlutils.c | 2 +- ext/wavpack/gstwavpackparse.c | 2 +- gst/effectv/gstwarp.c | 2 +- gst/rtp/gstrtph263pay.c | 2 +- gst/udp/gstmultiudpsink.c | 6 +++--- tests/check/elements/cmmldec.c | 8 ++++---- tests/check/elements/cmmlenc.c | 8 ++++---- tests/check/elements/deinterlace.c | 2 +- tests/check/elements/rglimiter.c | 2 +- tests/check/elements/rtp-payloading.c | 2 +- tests/check/elements/udpsink.c | 2 +- tests/check/elements/videofilter.c | 6 +++--- tests/check/elements/wavpackdec.c | 2 +- tests/check/generic/states.c | 4 ++-- tests/icles/v4l2src-test.c | 2 +- 16 files changed, 28 insertions(+), 28 deletions(-) diff --git a/configure.ac b/configure.ac index d6015598fe..61b37a55d0 100644 --- a/configure.ac +++ b/configure.ac @@ -272,10 +272,10 @@ dnl set location of plugin directory AG_GST_SET_PLUGINDIR dnl define an ERROR_CFLAGS Makefile variable -AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef -Wwrite-strings]) +AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wold-style-definition]) dnl define an ERROR_CXXFLAGS Makefile variable -AG_GST_SET_ERROR_CXXFLAGS($GST_GIT, [-Wmissing-declarations -Wredundant-decls -Wundef -Wwrite-strings]) +AG_GST_SET_ERROR_CXXFLAGS($GST_GIT, [-Wmissing-declarations -Wredundant-decls -Wundef -Wwrite-strings -Wold-style-definition]) dnl define correct level for debugging messages AG_GST_SET_LEVEL_DEFAULT($GST_GIT) diff --git a/ext/annodex/gstcmmlutils.c b/ext/annodex/gstcmmlutils.c index 6ec682966f..a66b3f0642 100644 --- a/ext/annodex/gstcmmlutils.c +++ b/ext/annodex/gstcmmlutils.c @@ -228,7 +228,7 @@ overflow: /* track list */ GHashTable * -gst_cmml_track_list_new () +gst_cmml_track_list_new (void) { return g_hash_table_new (g_str_hash, g_str_equal); } diff --git a/ext/wavpack/gstwavpackparse.c b/ext/wavpack/gstwavpackparse.c index fbb933197f..47147a891f 100644 --- a/ext/wavpack/gstwavpackparse.c +++ b/ext/wavpack/gstwavpackparse.c @@ -56,7 +56,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_wavpack_parse_debug); #define GST_CAT_DEFAULT gst_wavpack_parse_debug static inline GstWavpackParseIndexEntry * -gst_wavpack_parse_index_entry_new () +gst_wavpack_parse_index_entry_new (void) { return g_slice_new (GstWavpackParseIndexEntry); } diff --git a/gst/effectv/gstwarp.c b/gst/effectv/gstwarp.c index 0b0c4adcb5..72c4eb03d8 100644 --- a/gst/effectv/gstwarp.c +++ b/gst/effectv/gstwarp.c @@ -115,7 +115,7 @@ gst_warptv_set_caps (GstBaseTransform * btrans, GstCaps * incaps, static gint32 sintable[1024 + 256]; static void -initSinTable () +initSinTable (void) { gint32 *tptr, *tsinptr; double i; diff --git a/gst/rtp/gstrtph263pay.c b/gst/rtp/gstrtph263pay.c index fd10d9833d..ea064be650 100644 --- a/gst/rtp/gstrtph263pay.c +++ b/gst/rtp/gstrtph263pay.c @@ -531,7 +531,7 @@ gst_rtp_h263_pay_get_property (GObject * object, guint prop_id, } static GstRtpH263PayPackage * -gst_rtp_h263_pay_package_new_empty () +gst_rtp_h263_pay_package_new_empty (void) { return (GstRtpH263PayPackage *) g_malloc0 (sizeof (GstRtpH263PayPackage)); } diff --git a/gst/udp/gstmultiudpsink.c b/gst/udp/gstmultiudpsink.c index 1b8ba65beb..d27bdbec47 100644 --- a/gst/udp/gstmultiudpsink.c +++ b/gst/udp/gstmultiudpsink.c @@ -377,7 +377,7 @@ gst_multiudpsink_finalize (GObject * object) } static gboolean -socket_error_is_ignorable () +socket_error_is_ignorable (void) { #ifdef G_OS_WIN32 /* Windows doesn't seem to have an EAGAIN for sockets */ @@ -388,7 +388,7 @@ socket_error_is_ignorable () } static int -socket_last_error_code () +socket_last_error_code (void) { #ifdef G_OS_WIN32 return WSAGetLastError (); @@ -398,7 +398,7 @@ socket_last_error_code () } static gchar * -socket_last_error_message () +socket_last_error_message (void) { #ifdef G_OS_WIN32 int errorcode = WSAGetLastError (); diff --git a/tests/check/elements/cmmldec.c b/tests/check/elements/cmmldec.c index dff3d20fd8..a7d5848ecf 100644 --- a/tests/check/elements/cmmldec.c +++ b/tests/check/elements/cmmldec.c @@ -138,7 +138,7 @@ buffer_unref (void *buffer, void *user_data) } static void -setup_cmmldec () +setup_cmmldec (void) { GST_DEBUG ("setup_cmmldec"); cmmldec = gst_check_setup_element ("cmmldec"); @@ -160,7 +160,7 @@ setup_cmmldec () } static void -teardown_cmmldec () +teardown_cmmldec (void) { g_list_foreach (buffers, buffer_unref, NULL); g_list_free (buffers); @@ -240,7 +240,7 @@ cmml_tag_message_pop (GstBus * bus, const gchar * tag) } static void -check_headers () +check_headers (void) { GObject *head_tag; @@ -581,7 +581,7 @@ GST_START_TEST (test_sink_query_convert) GST_END_TEST; static Suite * -cmmldec_suite () +cmmldec_suite (void) { Suite *s = suite_create ("cmmldec"); diff --git a/tests/check/elements/cmmlenc.c b/tests/check/elements/cmmlenc.c index a39a18c5c6..eff12414c8 100644 --- a/tests/check/elements/cmmlenc.c +++ b/tests/check/elements/cmmlenc.c @@ -152,7 +152,7 @@ buffer_unref (void *buffer, void *user_data) } static void -setup_cmmlenc () +setup_cmmlenc (void) { guint64 granulerate_n, granulerate_d; @@ -179,7 +179,7 @@ setup_cmmlenc () } static void -teardown_cmmlenc () +teardown_cmmlenc (void) { /* free encoded buffers */ g_list_foreach (buffers, buffer_unref, NULL); @@ -231,7 +231,7 @@ push_data (const gchar * name, const gchar * data, gint size) } static void -check_headers () +check_headers (void) { /* push the cmml start tag */ flow = push_data ("preamble", PREAMBLE, strlen (PREAMBLE)); @@ -473,7 +473,7 @@ GST_START_TEST (test_time_limits) GST_END_TEST; static Suite * -cmmlenc_suite () +cmmlenc_suite (void) { Suite *s = suite_create ("cmmlenc"); TCase *tc_general = tcase_create ("general"); diff --git a/tests/check/elements/deinterlace.c b/tests/check/elements/deinterlace.c index c7c66cf309..2f7b29847c 100644 --- a/tests/check/elements/deinterlace.c +++ b/tests/check/elements/deinterlace.c @@ -79,7 +79,7 @@ static GstElement *pipeline; /* sets up deinterlace and shortcut pointers to its pads */ static void -setup_deinterlace () +setup_deinterlace (void) { deinterlace = gst_element_factory_make ("deinterlace", NULL); fail_unless (deinterlace != NULL); diff --git a/tests/check/elements/rglimiter.c b/tests/check/elements/rglimiter.c index 54747d8dc6..9765794b6b 100644 --- a/tests/check/elements/rglimiter.c +++ b/tests/check/elements/rglimiter.c @@ -101,7 +101,7 @@ static const gfloat test_output[] = { }; static GstBuffer * -create_test_buffer () +create_test_buffer (void) { GstBuffer *buf = gst_buffer_new_and_alloc (sizeof (test_input)); GstCaps *caps; diff --git a/tests/check/elements/rtp-payloading.c b/tests/check/elements/rtp-payloading.c index 1794e9c20d..4502fb87c6 100644 --- a/tests/check/elements/rtp-payloading.c +++ b/tests/check/elements/rtp-payloading.c @@ -774,7 +774,7 @@ GST_END_TEST; * Returns: pointer to the test suite. */ static Suite * -rtp_payloading_suite () +rtp_payloading_suite (void) { Suite *s = suite_create ("rtp_data_test"); diff --git a/tests/check/elements/udpsink.c b/tests/check/elements/udpsink.c index 62f380dd13..10d7df5f93 100644 --- a/tests/check/elements/udpsink.c +++ b/tests/check/elements/udpsink.c @@ -189,7 +189,7 @@ GST_END_TEST; * Returns: pointer to the test suite. */ static Suite * -udpsink_suite () +udpsink_suite (void) { Suite *s = suite_create ("udpsink_test"); diff --git a/tests/check/elements/videofilter.c b/tests/check/elements/videofilter.c index 4e9b6b1ce6..f7959ec2fc 100644 --- a/tests/check/elements/videofilter.c +++ b/tests/check/elements/videofilter.c @@ -164,7 +164,7 @@ GST_END_TEST; static Suite * -videobalance_suite () +videobalance_suite (void) { Suite *s = suite_create ("videobalance"); TCase *tc_chain = tcase_create ("general"); @@ -176,7 +176,7 @@ videobalance_suite () } static Suite * -videoflip_suite () +videoflip_suite (void) { Suite *s = suite_create ("videoflip"); TCase *tc_chain = tcase_create ("general"); @@ -188,7 +188,7 @@ videoflip_suite () } static Suite * -gamma_suite () +gamma_suite (void) { Suite *s = suite_create ("gamma"); TCase *tc_chain = tcase_create ("general"); diff --git a/tests/check/elements/wavpackdec.c b/tests/check/elements/wavpackdec.c index 54a764b60f..0d17323336 100644 --- a/tests/check/elements/wavpackdec.c +++ b/tests/check/elements/wavpackdec.c @@ -67,7 +67,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", ); static GstElement * -setup_wavpackdec (dec) +setup_wavpackdec (void) { GstElement *wavpackdec; diff --git a/tests/check/generic/states.c b/tests/check/generic/states.c index 68f807abab..1ed6dc9389 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; diff --git a/tests/icles/v4l2src-test.c b/tests/icles/v4l2src-test.c index edbfd93888..4fcf48b726 100644 --- a/tests/icles/v4l2src-test.c +++ b/tests/icles/v4l2src-test.c @@ -33,7 +33,7 @@ GMainLoop *loop; volatile int exit_read = 0; static void -print_options () +print_options (void) { printf ("\nf - to change the fequency\n"); printf ("i - to change the input\n");