From 64d0037d0a2692d692b2b4f0a7a28d01fbfc5bf8 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 26 Sep 2013 14:38:02 +0100 Subject: Suppress remaining GValueArray deprecation warnings Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69849 Reviewed-by: Xavier Claessens --- tests/capabilities.c | 4 ++++ tests/gnio-util.c | 8 ++++++++ tests/lib/contacts-conn.c | 2 ++ tests/util.c | 2 ++ 4 files changed, 16 insertions(+) (limited to 'tests') diff --git a/tests/capabilities.c b/tests/capabilities.c index b7c87f36c..7eab5e76e 100644 --- a/tests/capabilities.c +++ b/tests/capabilities.c @@ -118,8 +118,10 @@ test_basics (Test *test, arr = g_ptr_array_index (classes, 0); g_assert_cmpuint (arr->n_values, ==, 2); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS fixed = g_value_get_boxed (g_value_array_get_nth (arr, 0)); allowed = g_value_get_boxed (g_value_array_get_nth (arr, 1)); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS g_assert_cmpuint (g_hash_table_size (fixed), ==, 2); @@ -137,8 +139,10 @@ test_basics (Test *test, arr = g_ptr_array_index (classes, 1); g_assert_cmpuint (arr->n_values, ==, 2); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS fixed = g_value_get_boxed (g_value_array_get_nth (arr, 0)); allowed = g_value_get_boxed (g_value_array_get_nth (arr, 1)); + G_GNUC_END_IGNORE_DEPRECATIONS g_assert_cmpuint (g_hash_table_size (fixed), ==, 2); diff --git a/tests/gnio-util.c b/tests/gnio-util.c index 90de7a70c..6ac758a0d 100644 --- a/tests/gnio-util.c +++ b/tests/gnio-util.c @@ -109,12 +109,16 @@ test_sockaddr_to_variant_ipv4 (void) g_assert (G_VALUE_HOLDS (variant, TP_STRUCT_TYPE_SOCKET_ADDRESS_IPV4)); array = g_value_get_boxed (variant); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS value = g_value_array_get_nth (array, 0); + G_GNUC_END_IGNORE_DEPRECATIONS g_assert (G_VALUE_HOLDS_STRING (value)); g_assert_cmpstr (g_value_get_string (value), ==, IPV4_ADDR); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS value = g_value_array_get_nth (array, 1); + G_GNUC_END_IGNORE_DEPRECATIONS g_assert (G_VALUE_HOLDS_UINT (value)); g_assert_cmpuint (g_value_get_uint (value), ==, PORT); @@ -152,12 +156,16 @@ test_sockaddr_to_variant_ipv6 (void) g_assert (G_VALUE_HOLDS (variant, TP_STRUCT_TYPE_SOCKET_ADDRESS_IPV6)); array = g_value_get_boxed (variant); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS value = g_value_array_get_nth (array, 0); + G_GNUC_END_IGNORE_DEPRECATIONS g_assert (G_VALUE_HOLDS_STRING (value)); g_assert_cmpstr (g_value_get_string (value), ==, IPV6_ADDR); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS value = g_value_array_get_nth (array, 1); + G_GNUC_END_IGNORE_DEPRECATIONS g_assert (G_VALUE_HOLDS_UINT (value)); g_assert_cmpuint (g_value_get_uint (value), ==, PORT); diff --git a/tests/lib/contacts-conn.c b/tests/lib/contacts-conn.c index e90612e40..5b96b0c1a 100644 --- a/tests/lib/contacts-conn.c +++ b/tests/lib/contacts-conn.c @@ -1330,9 +1330,11 @@ my_set_contact_info (TpSvcConnectionInterfaceContactInfo *obj, TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (base, context); /* Deep copy info */ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS copy = g_ptr_array_new_with_free_func ((GDestroyNotify) g_value_array_free); for (i = 0; i < info->len; i++) g_ptr_array_add (copy, g_value_array_copy (g_ptr_array_index (info, i))); + G_GNUC_END_IGNORE_DEPRECATIONS self_handle = tp_base_connection_get_self_handle (base); tp_tests_contacts_connection_change_contact_info (self, self_handle, copy); diff --git a/tests/util.c b/tests/util.c index 44fee02ce..1bf9533c6 100644 --- a/tests/util.c +++ b/tests/util.c @@ -37,10 +37,12 @@ test_value_array_build (void) G_TYPE_UINT, port, G_TYPE_INVALID); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS g_assert_cmpstr (g_value_get_string (g_value_array_get_nth (arr, 0)), ==, host); g_assert_cmpuint (g_value_get_uint (g_value_array_get_nth (arr, 1)), ==, port); + G_GNUC_END_IGNORE_DEPRECATIONS tp_value_array_unpack (arr, 2, &host_out, -- cgit v1.2.1