[glib-networking] Fix two warnings by the MSVC compiler



commit d8ac5ca2d670ab28657442a58fa4ac09633a4850
Author: Nirbheek Chauhan <nirbheek centricular com>
Date:   Wed Feb 20 20:28:33 2019 +0530

    Fix two warnings by the MSVC compiler
    
    gtlsconnection-openssl.c(294): warning C4090: 'function': different 'const' qualifiers
    
    tls\tests\dtls-connection.c(842): warning C4244: 'initializing': conversion from 'double' to 'gint64', 
possible loss of data

 tls/openssl/gtlsconnection-openssl.c | 2 +-
 tls/tests/dtls-connection.c          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tls/openssl/gtlsconnection-openssl.c b/tls/openssl/gtlsconnection-openssl.c
index 622d403..81fdf04 100644
--- a/tls/openssl/gtlsconnection-openssl.c
+++ b/tls/openssl/gtlsconnection-openssl.c
@@ -288,7 +288,7 @@ verify_ocsp_response (GTlsConnectionOpenssl *openssl,
   SSL *ssl = NULL;
   OCSP_RESPONSE *resp = NULL;
   long len = 0;
-  const unsigned char *p = NULL;
+  unsigned char *p = NULL;
 
   ssl = g_tls_connection_openssl_get_ssl (openssl);
   len = SSL_get_tlsext_status_ocsp_resp (ssl, &p);
diff --git a/tls/tests/dtls-connection.c b/tls/tests/dtls-connection.c
index c65f693..41debd5 100644
--- a/tls/tests/dtls-connection.c
+++ b/tls/tests/dtls-connection.c
@@ -841,7 +841,7 @@ main (int   argc,
   };
   const TestData client_timeout = {
     0,  /* server_timeout */
-    0.5 * G_USEC_PER_SEC,  /* client_timeout */
+    (gint64) (0.5 * G_USEC_PER_SEC),  /* client_timeout */
     TRUE,  /* server_should_disappear */
     TRUE, /* server_should_close */
     G_TLS_AUTHENTICATION_NONE,  /* auth_mode */


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