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
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)

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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;

View file

@ -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));
}

View file

@ -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 ();

View file

@ -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");

View file

@ -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");

View file

@ -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);

View file

@ -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;

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

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

View file

@ -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;

View file

@ -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");