Add -Wold-style-definition flag

And fix the warnings
This commit is contained in:
Benjamin Otte 2010-03-21 15:17:46 +01:00
parent 3f511ec361
commit 412cc10314
16 changed files with 28 additions and 28 deletions

View file

@ -272,10 +272,10 @@ dnl set location of plugin directory
AG_GST_SET_PLUGINDIR AG_GST_SET_PLUGINDIR
dnl define an ERROR_CFLAGS Makefile variable 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 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 dnl define correct level for debugging messages
AG_GST_SET_LEVEL_DEFAULT($GST_GIT) AG_GST_SET_LEVEL_DEFAULT($GST_GIT)

View file

@ -228,7 +228,7 @@ overflow:
/* track list */ /* track list */
GHashTable * GHashTable *
gst_cmml_track_list_new () gst_cmml_track_list_new (void)
{ {
return g_hash_table_new (g_str_hash, g_str_equal); return g_hash_table_new (g_str_hash, g_str_equal);
} }

View file

@ -56,7 +56,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_wavpack_parse_debug);
#define GST_CAT_DEFAULT gst_wavpack_parse_debug #define GST_CAT_DEFAULT gst_wavpack_parse_debug
static inline GstWavpackParseIndexEntry * static inline GstWavpackParseIndexEntry *
gst_wavpack_parse_index_entry_new () gst_wavpack_parse_index_entry_new (void)
{ {
return g_slice_new (GstWavpackParseIndexEntry); return g_slice_new (GstWavpackParseIndexEntry);
} }

View file

@ -115,7 +115,7 @@ gst_warptv_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
static gint32 sintable[1024 + 256]; static gint32 sintable[1024 + 256];
static void static void
initSinTable () initSinTable (void)
{ {
gint32 *tptr, *tsinptr; gint32 *tptr, *tsinptr;
double i; double i;

View file

@ -531,7 +531,7 @@ gst_rtp_h263_pay_get_property (GObject * object, guint prop_id,
} }
static GstRtpH263PayPackage * static GstRtpH263PayPackage *
gst_rtp_h263_pay_package_new_empty () gst_rtp_h263_pay_package_new_empty (void)
{ {
return (GstRtpH263PayPackage *) g_malloc0 (sizeof (GstRtpH263PayPackage)); return (GstRtpH263PayPackage *) g_malloc0 (sizeof (GstRtpH263PayPackage));
} }

View file

@ -377,7 +377,7 @@ gst_multiudpsink_finalize (GObject * object)
} }
static gboolean static gboolean
socket_error_is_ignorable () socket_error_is_ignorable (void)
{ {
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
/* Windows doesn't seem to have an EAGAIN for sockets */ /* Windows doesn't seem to have an EAGAIN for sockets */
@ -388,7 +388,7 @@ socket_error_is_ignorable ()
} }
static int static int
socket_last_error_code () socket_last_error_code (void)
{ {
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
return WSAGetLastError (); return WSAGetLastError ();
@ -398,7 +398,7 @@ socket_last_error_code ()
} }
static gchar * static gchar *
socket_last_error_message () socket_last_error_message (void)
{ {
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
int errorcode = WSAGetLastError (); int errorcode = WSAGetLastError ();

View file

@ -138,7 +138,7 @@ buffer_unref (void *buffer, void *user_data)
} }
static void static void
setup_cmmldec () setup_cmmldec (void)
{ {
GST_DEBUG ("setup_cmmldec"); GST_DEBUG ("setup_cmmldec");
cmmldec = gst_check_setup_element ("cmmldec"); cmmldec = gst_check_setup_element ("cmmldec");
@ -160,7 +160,7 @@ setup_cmmldec ()
} }
static void static void
teardown_cmmldec () teardown_cmmldec (void)
{ {
g_list_foreach (buffers, buffer_unref, NULL); g_list_foreach (buffers, buffer_unref, NULL);
g_list_free (buffers); g_list_free (buffers);
@ -240,7 +240,7 @@ cmml_tag_message_pop (GstBus * bus, const gchar * tag)
} }
static void static void
check_headers () check_headers (void)
{ {
GObject *head_tag; GObject *head_tag;
@ -581,7 +581,7 @@ GST_START_TEST (test_sink_query_convert)
GST_END_TEST; GST_END_TEST;
static Suite * static Suite *
cmmldec_suite () cmmldec_suite (void)
{ {
Suite *s = suite_create ("cmmldec"); Suite *s = suite_create ("cmmldec");

View file

@ -152,7 +152,7 @@ buffer_unref (void *buffer, void *user_data)
} }
static void static void
setup_cmmlenc () setup_cmmlenc (void)
{ {
guint64 granulerate_n, granulerate_d; guint64 granulerate_n, granulerate_d;
@ -179,7 +179,7 @@ setup_cmmlenc ()
} }
static void static void
teardown_cmmlenc () teardown_cmmlenc (void)
{ {
/* free encoded buffers */ /* free encoded buffers */
g_list_foreach (buffers, buffer_unref, NULL); g_list_foreach (buffers, buffer_unref, NULL);
@ -231,7 +231,7 @@ push_data (const gchar * name, const gchar * data, gint size)
} }
static void static void
check_headers () check_headers (void)
{ {
/* push the cmml start tag */ /* push the cmml start tag */
flow = push_data ("preamble", PREAMBLE, strlen (PREAMBLE)); flow = push_data ("preamble", PREAMBLE, strlen (PREAMBLE));
@ -473,7 +473,7 @@ GST_START_TEST (test_time_limits)
GST_END_TEST; GST_END_TEST;
static Suite * static Suite *
cmmlenc_suite () cmmlenc_suite (void)
{ {
Suite *s = suite_create ("cmmlenc"); Suite *s = suite_create ("cmmlenc");
TCase *tc_general = tcase_create ("general"); TCase *tc_general = tcase_create ("general");

View file

@ -79,7 +79,7 @@ static GstElement *pipeline;
/* sets up deinterlace and shortcut pointers to its pads */ /* sets up deinterlace and shortcut pointers to its pads */
static void static void
setup_deinterlace () setup_deinterlace (void)
{ {
deinterlace = gst_element_factory_make ("deinterlace", NULL); deinterlace = gst_element_factory_make ("deinterlace", NULL);
fail_unless (deinterlace != NULL); fail_unless (deinterlace != NULL);

View file

@ -101,7 +101,7 @@ static const gfloat test_output[] = {
}; };
static GstBuffer * static GstBuffer *
create_test_buffer () create_test_buffer (void)
{ {
GstBuffer *buf = gst_buffer_new_and_alloc (sizeof (test_input)); GstBuffer *buf = gst_buffer_new_and_alloc (sizeof (test_input));
GstCaps *caps; GstCaps *caps;

View file

@ -774,7 +774,7 @@ GST_END_TEST;
* Returns: pointer to the test suite. * Returns: pointer to the test suite.
*/ */
static Suite * static Suite *
rtp_payloading_suite () rtp_payloading_suite (void)
{ {
Suite *s = suite_create ("rtp_data_test"); Suite *s = suite_create ("rtp_data_test");

View file

@ -189,7 +189,7 @@ GST_END_TEST;
* Returns: pointer to the test suite. * Returns: pointer to the test suite.
*/ */
static Suite * static Suite *
udpsink_suite () udpsink_suite (void)
{ {
Suite *s = suite_create ("udpsink_test"); Suite *s = suite_create ("udpsink_test");

View file

@ -164,7 +164,7 @@ GST_END_TEST;
static Suite * static Suite *
videobalance_suite () videobalance_suite (void)
{ {
Suite *s = suite_create ("videobalance"); Suite *s = suite_create ("videobalance");
TCase *tc_chain = tcase_create ("general"); TCase *tc_chain = tcase_create ("general");
@ -176,7 +176,7 @@ videobalance_suite ()
} }
static Suite * static Suite *
videoflip_suite () videoflip_suite (void)
{ {
Suite *s = suite_create ("videoflip"); Suite *s = suite_create ("videoflip");
TCase *tc_chain = tcase_create ("general"); TCase *tc_chain = tcase_create ("general");
@ -188,7 +188,7 @@ videoflip_suite ()
} }
static Suite * static Suite *
gamma_suite () gamma_suite (void)
{ {
Suite *s = suite_create ("gamma"); Suite *s = suite_create ("gamma");
TCase *tc_chain = tcase_create ("general"); TCase *tc_chain = tcase_create ("general");

View file

@ -67,7 +67,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
); );
static GstElement * static GstElement *
setup_wavpackdec (dec) setup_wavpackdec (void)
{ {
GstElement *wavpackdec; GstElement *wavpackdec;

View file

@ -31,7 +31,7 @@
static GList *elements = NULL; static GList *elements = NULL;
static void static void
setup () setup (void)
{ {
GList *features, *f; GList *features, *f;
GList *plugins, *p; GList *plugins, *p;
@ -88,7 +88,7 @@ setup ()
} }
static void static void
teardown () teardown (void)
{ {
GList *e; GList *e;

View file

@ -33,7 +33,7 @@ GMainLoop *loop;
volatile int exit_read = 0; volatile int exit_read = 0;
static void static void
print_options () print_options (void)
{ {
printf ("\nf - to change the fequency\n"); printf ("\nf - to change the fequency\n");
printf ("i - to change the input\n"); printf ("i - to change the input\n");