[gobject-introspection] tests: Fix compiler warnings



commit f65395f5f9f1ef980315ae11c454c324bb61e24d
Author: Martin Pitt <martinpitt gnome org>
Date:   Tue Jan 15 10:05:20 2013 +0100

    tests: Fix compiler warnings
    
    Fix (void) function declarations that occur with -Wstrict-prototypes, and the
    g_param_spec_get_name() which drops the const from its argument.

 tests/gimarshallingtests.c |    2 +-
 tests/gimarshallingtests.h |    2 +-
 tests/scanner/regress.c    |   10 +++++-----
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index a81e4d8..21d31e0 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -4706,7 +4706,7 @@ gi_marshalling_tests_param_spec_in_bool (const GParamSpec *param)
 {
     g_assert (G_IS_PARAM_SPEC (param));
     g_assert_cmpint (G_PARAM_SPEC_TYPE (param), ==, G_TYPE_BOOLEAN);
-    g_assert_cmpstr (g_param_spec_get_name(param), ==, "mybool");
+    g_assert_cmpstr (g_param_spec_get_name((GParamSpec*) param), ==, "mybool");
 }
 
 /**
diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h
index 10179c6..803b02c 100644
--- a/tests/gimarshallingtests.h
+++ b/tests/gimarshallingtests.h
@@ -573,7 +573,7 @@ GClosure *gi_marshalling_tests_gclosure_return (void);
 /**
  * GIMarshallingTestsCallbackReturnValueOnly:
  */
-typedef glong (* GIMarshallingTestsCallbackReturnValueOnly) ();
+typedef glong (* GIMarshallingTestsCallbackReturnValueOnly) (void);
 
 glong gi_marshalling_tests_callback_return_value_only (GIMarshallingTestsCallbackReturnValueOnly callback);
 
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index 89dc873..b5fc858 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -908,7 +908,7 @@ regress_test_array_int_null_out (int **arr, int *len)
 /* GList */
 
 static /*const*/ GList *
-regress_test_sequence_list()
+regress_test_sequence_list (void)
 {
     static GList *list = NULL;
     if (!list) {
@@ -1029,7 +1029,7 @@ regress_test_glist_null_out (GSList **out_list)
 /* GSList */
 
 static /*const*/ GSList *
-regress_test_sequence_slist()
+regress_test_sequence_slist (void)
 {
     static GSList *list = NULL;
     if (!list) {
@@ -1153,7 +1153,7 @@ static char *table_data[3][2] = {
 };
 
 static GHashTable *
-regress_test_table_ghash_new_container()
+regress_test_table_ghash_new_container (void)
 {
   GHashTable *hash;
   int i;
@@ -1164,7 +1164,7 @@ regress_test_table_ghash_new_container()
 }
 
 static GHashTable *
-regress_test_table_ghash_new_full()
+regress_test_table_ghash_new_full (void)
 {
   GHashTable *hash;
   int i;
@@ -1177,7 +1177,7 @@ regress_test_table_ghash_new_full()
 }
 
 static /*const*/ GHashTable *
-regress_test_table_ghash_const()
+regress_test_table_ghash_const (void)
 {
   static GHashTable *hash = NULL;
   if (!hash) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]