[glib-networking] Silence -Wdeprecated-declarations warning
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] Silence -Wdeprecated-declarations warning
- Date: Wed, 7 Feb 2018 23:37:22 +0000 (UTC)
commit ecad18edaf0fd8a05d4f60db40c4a696bd36386b
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Wed Feb 7 17:34:50 2018 -0600
Silence -Wdeprecated-declarations warning
tls/gnutls/gtlsconnection-gnutls.c | 11 ++++++++++-
tls/tests/connection.c | 7 +++++++
2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
index 9c7d387..8213336 100644
--- a/tls/gnutls/gtlsconnection-gnutls.c
+++ b/tls/gnutls/gtlsconnection-gnutls.c
@@ -338,7 +338,16 @@ g_tls_connection_gnutls_set_handshake_priority (GTlsConnectionGnutls *gnutls)
gboolean fallback, unsafe_rehandshake;
if (G_IS_TLS_CLIENT_CONNECTION (gnutls))
- fallback = g_tls_client_connection_get_use_ssl3 (G_TLS_CLIENT_CONNECTION (gnutls));
+ {
+#if defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+ fallback = g_tls_client_connection_get_use_ssl3 (G_TLS_CLIENT_CONNECTION (gnutls));
+#if defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
+ }
else
fallback = FALSE;
unsafe_rehandshake = (gnutls->priv->rehandshake_mode == G_TLS_REHANDSHAKE_UNSAFELY);
diff --git a/tls/tests/connection.c b/tls/tests/connection.c
index db8562b..c2e37a6 100644
--- a/tls/tests/connection.c
+++ b/tls/tests/connection.c
@@ -1957,8 +1957,15 @@ test_fallback (TestConnection *test,
g_tls_client_connection_set_validation_flags (G_TLS_CLIENT_CONNECTION (test->client_connection),
0);
+#if defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
g_tls_client_connection_set_use_ssl3 (G_TLS_CLIENT_CONNECTION (test->client_connection),
TRUE);
+#if defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
g_tls_connection_handshake_async (tlsconn, G_PRIORITY_DEFAULT, NULL,
quit_on_handshake_complete, test);
g_main_loop_run (test->loop);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]