[libgdata/wip/rishi/drive: 2/2] tests: Silence -Wunused-function



commit 6d52326107bc0abcca9a547f20c652998a495892
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Jun 3 15:44:47 2015 +0200

    tests: Silence -Wunused-function
    
    In some cases we only need to disable one part of a family of macro
    generated functions. I couldn't find a better way to suppress those
    cases, other than using dummy statements with #pragmas.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=750335

 gdata/tests/contacts.c  |    5 +++++
 gdata/tests/picasaweb.c |    2 ++
 gdata/tests/youtube.c   |    6 ++++++
 3 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/gdata/tests/contacts.c b/gdata/tests/contacts.c
index 2f8ae8e..ee92fcb 100644
--- a/gdata/tests/contacts.c
+++ b/gdata/tests/contacts.c
@@ -2650,6 +2650,11 @@ main (int argc, char *argv[])
                    tear_down_temp_contact);
        g_test_add ("/contacts/photo/delete/async", GDataAsyncTestData, service, 
set_up_temp_contact_with_photo_async,
                    test_photo_delete_async, tear_down_temp_contact_with_photo_async);
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-value"
+       test_photo_delete_async_cancellation;
+#pragma GCC diagnostic pop
 /*
  Too broken to continue running at the moment.
        g_test_add ("/contacts/photo/delete/async/cancellation", GDataAsyncTestData, service, 
set_up_temp_contact_with_photo_async,
diff --git a/gdata/tests/picasaweb.c b/gdata/tests/picasaweb.c
index 24d0401..7b521a3 100644
--- a/gdata/tests/picasaweb.c
+++ b/gdata/tests/picasaweb.c
@@ -1704,6 +1704,7 @@ test_upload_default_album (UploadData *data, gconstpointer service)
        uhm_server_end_trace (mock_server);
 }
 
+#if 0
 GDATA_ASYNC_CLOSURE_FUNCTIONS (upload, UploadData);
 
 GDATA_ASYNC_TEST_FUNCTIONS (upload_default_album, UploadData,
@@ -1767,6 +1768,7 @@ G_STMT_START {
 
        g_clear_error (&upload_error);
 } G_STMT_END);
+#endif
 
 static void
 test_album_new (void)
diff --git a/gdata/tests/youtube.c b/gdata/tests/youtube.c
index 4433093..6cc82f6 100644
--- a/gdata/tests/youtube.c
+++ b/gdata/tests/youtube.c
@@ -298,6 +298,7 @@ test_service_properties (void)
        g_object_unref (service);
 }
 
+#if 0
 static void
 test_query_standard_feeds (gconstpointer service)
 {
@@ -521,6 +522,7 @@ G_STMT_START {
        }
 } G_STMT_END);
 
+#if 0
 static void
 test_query_standard_feed_async_progress_closure (gconstpointer service)
 {
@@ -547,6 +549,7 @@ test_query_standard_feed_async_progress_closure (gconstpointer service)
 
        uhm_server_end_trace (mock_server);
 }
+#endif
 
 static GDataYouTubeVideo *
 get_video_for_related (void)
@@ -886,6 +889,7 @@ G_STMT_START {
 
        g_clear_error (&upload_error);
 } G_STMT_END);
+#endif
 
 static void
 test_parsing_app_control (void)
@@ -1291,6 +1295,7 @@ test_parsing_yt_recorded (void)
        g_object_unref (video);
 }
 
+#if 0
 static void
 test_parsing_yt_access_control (void)
 {
@@ -2611,6 +2616,7 @@ teardown_batch (BatchData *data, gconstpointer service)
        g_object_unref (data->new_video);
        g_object_unref (data->new_video2);
 }
+#endif
 
 static void
 mock_server_notify_resolver_cb (GObject *object, GParamSpec *pspec, gpointer user_data)


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