[Pkg-telepathy-commits] [telepathy-glib] 12/111: Suppress remaining GValueArray deprecation warnings

Simon McVittie smcv at debian.org
Wed Mar 19 18:07:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-glib.

commit 64d0037d0a2692d692b2b4f0a7a28d01fbfc5bf8
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Thu Sep 26 14:38:02 2013 +0100

    Suppress remaining GValueArray deprecation warnings
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69849
    Reviewed-by: Xavier Claessens <xavier.claessens at collabora.co.uk>
---
 telepathy-glib/base-media-call-stream.c         |  2 ++
 telepathy-glib/call-content-media-description.c |  4 ++++
 telepathy-glib/call-stream-endpoint.c           | 15 +++++++++++++++
 telepathy-glib/gnio-util.c                      |  2 ++
 telepathy-glib/util.c                           |  6 ++++++
 tests/capabilities.c                            |  4 ++++
 tests/gnio-util.c                               |  8 ++++++++
 tests/lib/contacts-conn.c                       |  2 ++
 tests/util.c                                    |  2 ++
 9 files changed, 45 insertions(+)

diff --git a/telepathy-glib/base-media-call-stream.c b/telepathy-glib/base-media-call-stream.c
index 09e3f7a..94b1199 100644
--- a/telepathy-glib/base-media-call-stream.c
+++ b/telepathy-glib/base-media-call-stream.c
@@ -1439,8 +1439,10 @@ tp_base_media_call_stream_add_candidates (TpSvcCallStreamInterfaceMedia *iface,
     {
       GValueArray *c = g_ptr_array_index (accepted_candidates, i);
 
+      G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       g_ptr_array_add (self->priv->local_candidates,
           g_value_array_copy (c));
+      G_GNUC_END_IGNORE_DEPRECATIONS
     }
 
   tp_svc_call_stream_interface_media_emit_local_candidates_added (self,
diff --git a/telepathy-glib/call-content-media-description.c b/telepathy-glib/call-content-media-description.c
index 854b7fe..bd6b205 100644
--- a/telepathy-glib/call-content-media-description.c
+++ b/telepathy-glib/call-content-media-description.c
@@ -975,7 +975,9 @@ tp_call_content_media_description_add_rtcp_feedback_message (
   g_return_if_fail (TP_IS_CALL_CONTENT_MEDIA_DESCRIPTION (self));
 
   properties = ensure_rtcp_feedback_properties (self, codec_identifier);
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   value = g_value_array_get_nth (properties, 1);
+  G_GNUC_END_IGNORE_DEPRECATIONS
   messages_array = g_value_get_boxed (value);
 
   g_ptr_array_add (messages_array, tp_value_array_build (3,
@@ -1022,7 +1024,9 @@ tp_call_content_media_description_set_rtcp_feedback_minimum_interval (
   g_return_if_fail (TP_IS_CALL_CONTENT_MEDIA_DESCRIPTION (self));
 
   properties = ensure_rtcp_feedback_properties (self, codec_identifier);
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   value = g_value_array_get_nth (properties, 0);
+  G_GNUC_END_IGNORE_DEPRECATIONS
   g_value_set_uint (value, rtcp_minimum_interval);
 
   tp_call_content_media_description_add_rtcp_feedback_interface (self);
diff --git a/telepathy-glib/call-stream-endpoint.c b/telepathy-glib/call-stream-endpoint.c
index 08d65d1..b624601 100644
--- a/telepathy-glib/call-stream-endpoint.c
+++ b/telepathy-glib/call-stream-endpoint.c
@@ -583,8 +583,10 @@ tp_call_stream_endpoint_add_new_candidates (TpCallStreamEndpoint *self,
     {
       GValueArray *c = g_ptr_array_index (candidates, i);
 
+      G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       g_ptr_array_add (self->priv->remote_candidates,
           g_value_array_copy (c));
+      G_GNUC_END_IGNORE_DEPRECATIONS
     }
 
   tp_svc_call_stream_endpoint_emit_remote_candidates_added (self,
@@ -681,7 +683,10 @@ validate_candidate (const GValueArray *candidate,
       return FALSE;
     }
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   value = g_value_array_get_nth ((GValueArray *) candidate, 0);
+  G_GNUC_END_IGNORE_DEPRECATIONS
+
   if (g_value_get_uint (value) >= TP_NUM_STREAM_COMPONENTS)
     {
       g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
@@ -689,7 +694,10 @@ validate_candidate (const GValueArray *candidate,
       return FALSE;
     }
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   value = g_value_array_get_nth ((GValueArray *) candidate, 1);
+  G_GNUC_END_IGNORE_DEPRECATIONS
+
   if (tp_str_empty (g_value_get_string (value)))
     {
       g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
@@ -697,7 +705,10 @@ validate_candidate (const GValueArray *candidate,
       return FALSE;
     }
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   value = g_value_array_get_nth ((GValueArray *) candidate, 2);
+  G_GNUC_END_IGNORE_DEPRECATIONS
+
   if (g_value_get_uint (value) > 65535)
     {
       g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
@@ -713,7 +724,9 @@ get_candidate_component (const GValueArray *candidate)
 {
   GValue *component_value;
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   component_value = g_value_array_get_nth ((GValueArray *) candidate, 0);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   return g_value_get_uint (component_value);
 }
@@ -778,8 +791,10 @@ call_stream_endpoint_set_selected_candidate_pair (TpSvcCallStreamEndpoint *iface
       TpStreamComponent this_component;
 
       this_pair = g_ptr_array_index (self->priv->selected_candidate_pairs, i);
+      G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       this_component = get_candidate_component (
           g_value_get_boxed (g_value_array_get_nth (this_pair, 0)));
+      G_GNUC_END_IGNORE_DEPRECATIONS
 
       if (this_component == component)
         {
diff --git a/telepathy-glib/gnio-util.c b/telepathy-glib/gnio-util.c
index 1ce6cd5..9b49e08 100644
--- a/telepathy-glib/gnio-util.c
+++ b/telepathy-glib/gnio-util.c
@@ -148,8 +148,10 @@ tp_g_socket_address_from_variant (TpSocketAddressType type,
         else
           {
             GValueArray *array = g_value_get_boxed (variant);
+            G_GNUC_BEGIN_IGNORE_DEPRECATIONS
             GValue *hostv = g_value_array_get_nth (array, 0);
             GValue *portv = g_value_array_get_nth (array, 1);
+            G_GNUC_END_IGNORE_DEPRECATIONS
             GInetAddress *address;
             const char *host;
             guint16 port;
diff --git a/telepathy-glib/util.c b/telepathy-glib/util.c
index 2582624..b62e7b7 100644
--- a/telepathy-glib/util.c
+++ b/telepathy-glib/util.c
@@ -1111,7 +1111,9 @@ tp_value_array_build (gsize length,
   va_list var_args;
   char *error = NULL;
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   arr = g_value_array_new (length);
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   va_start (var_args, type);
 
@@ -1119,7 +1121,9 @@ tp_value_array_build (gsize length,
     {
       GValue *v = arr->values + arr->n_values;
 
+      G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       g_value_array_append (arr, NULL);
+      G_GNUC_END_IGNORE_DEPRECATIONS
 
       g_value_init (v, t);
 
@@ -1188,7 +1192,9 @@ tp_value_array_unpack (GValueArray *array,
           break;
         }
 
+      G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       value = g_value_array_get_nth (array, i);
+      G_GNUC_END_IGNORE_DEPRECATIONS
 
       G_VALUE_LCOPY (value, var_args, G_VALUE_NOCOPY_CONTENTS, &error);
       if (error != NULL)
diff --git a/tests/capabilities.c b/tests/capabilities.c
index b7c87f3..7eab5e7 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 90de7a7..6ac758a 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 e90612e..5b96b0c 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 44fee02..1bf9533 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,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-glib.git



More information about the Pkg-telepathy-commits mailing list