tests: Silence compiler warnings.
authorMatthew Barnes <mbarnes@redhat.com>
Fri, 1 Mar 2013 16:56:24 +0000 (11:56 -0500)
committerMatthew Barnes <mbarnes@redhat.com>
Fri, 1 Mar 2013 16:56:24 +0000 (11:56 -0500)
Silence compiler warnings in tests which are already partially disabled.
Most of these still haven't been updated since the ESource API changes.

tests/libebook/client/test-client-stress-views.c
tests/libebook/test-bulk-methods.c
tests/libebook/test-ebook-async.c
tests/libebook/test-ebook.c
tests/libebook/test-stress-bookviews.c
tests/libebook/vcard/dump-vcard.c
tests/libecal/client/test-client-stress-views.c
tests/libecal/test-ecal-stress-factory--single-cal.c
tests/libedataserver/e-source-test.c

index c4b4782..7a666f0 100644 (file)
@@ -7,6 +7,7 @@
 
 #define NUM_VIEWS 200
 
+#if 0  /* ACCOUNT_MGMT */
 static void
 objects_added (EBookClientView *view,
                const GSList *contacts)
@@ -96,6 +97,7 @@ stress_book_views_thread (gpointer user_data)
 
        return NULL;
 }
+#endif /* ACCOUNT_MGMT */
 
 gint
 main (gint argc,
index d35a046..e5636bb 100644 (file)
@@ -2,6 +2,7 @@
 
 #define BATCH_SIZE 50
 
+#if 0  /* ACCOUNT_MGMT */
 static gboolean
 check_string_in_slist (GSList *list,
                        const gchar *str)
@@ -163,6 +164,7 @@ test_bulk_modify (EBookClient *client,
        g_slist_free_full (contacts, g_object_unref);
        return TRUE;
 }
+#endif /* ACCOUNT_MGMT */
 
 gint main (gint argc, gchar **argv)
 {
index 4cd5334..067911f 100644 (file)
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <libebook/libebook.h>
 
+#if 0  /* ACCOUNT_MGMT */
 static GMainLoop *loop;
 
 static void
@@ -92,6 +93,7 @@ book_loaded_cb (EBook *book,
        printf ("printing one contact\n");
        print_one_email (book);
 }
+#endif /* ACCOUNT_MGMT */
 
 gint
 main (gint argc,
index 708719a..c61433b 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "ebook-test-utils.h"
 
+#if 0  /* ACCOUNT_MGMT */
 static void
 print_email (EContact *contact)
 {
@@ -69,6 +70,7 @@ print_one_email (EBook *book)
 
        g_object_unref (contact);
 }
+#endif /* ACCOUNT_MGMT */
 
 gint
 main (gint argc,
index ed7b8c0..3cd2e54 100644 (file)
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <libebook/libebook.h>
 
+#if 0  /* ACCOUNT_MGMT */
 static void
 print_contact (EContact *contact)
 {
@@ -51,6 +52,7 @@ view_complete (EBookView *book_view,
 {
   printf ("view_complete (status == %d, error_msg == %s%s%s)\n", status, error_msg ? "'" : "", error_msg ? error_msg : "NULL", error_msg ? "'" : "");
 }
+#endif /* ACCOUNT_MGMT */
 
 gint
 main (gint argc,
index a108041..c8c9260 100644 (file)
@@ -17,7 +17,9 @@ main (gint argc,
                return 1;
        }
 
+#if !GLIB_CHECK_VERSION (2, 35, 1)
        g_type_init_with_debug_flags (G_TYPE_DEBUG_OBJECTS);
+#endif
 
        fp = fopen (argv[1], "r");
        if (fp == NULL) {
index 427e05d..b06838c 100644 (file)
@@ -7,6 +7,7 @@
 
 #define NUM_VIEWS 200
 
+#if 0  /* ACCOUNT_MGMT */
 static void
 objects_added (ECalClientView *cal_view,
                const GSList *objects)
@@ -87,6 +88,7 @@ stress_cal_views_thread (gpointer user_data)
 
        return NULL;
 }
+#endif /* ACCOUNT_MGMT */
 
 gint
 main (gint argc,
index 82ae90b..1378413 100644 (file)
@@ -13,7 +13,9 @@ main (gint argc,
 {
        gchar *uri = NULL;
        ECal *cal;
+#if 0
        gint i;
+#endif
 
        g_type_init ();
 
index d6b6da0..f66bdcf 100644 (file)
@@ -42,6 +42,7 @@ struct _TestFixture {
        gboolean changed;
 };
 
+#if 0  /* ACCOUNT_MGMT */
 static void
 source_changed_cb (ESource *source,
                    TestESource *test)
@@ -73,10 +74,8 @@ setup_test_source (TestESource *test,
        test->file = g_file_new_for_path (filename);
 
        /* Create an ESource from the GFile and load the key file. */
-#if 0  /* ACCOUNT_MGMT */
        test->source = e_source_new (test->file, &error);
        g_assert_no_error (error);
-#endif /* ACCOUNT_MGMT */
 
        g_signal_connect (
                test->source, "changed",
@@ -97,6 +96,7 @@ teardown_test_source (TestESource *test)
        g_object_unref (test->file);
        g_object_unref (test->source);
 }
+#endif /* ACCOUNT_MGMT */
 
 static void
 test_fixture_setup_key_file (TestFixture *fixture,