gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 200/256: conversions: fix several compiler warnings


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 200/256: conversions: fix several compiler warnings
Date: Fri, 06 Oct 2017 19:44:51 +0200

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 93843c372f101b994194f0192db159c16d26a7c0
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon Sep 11 00:31:12 2017 +0200

    conversions: fix several compiler warnings
---
 lib/transfer.c     | 27 ++++++++++++++-------------
 lib/vtls/openssl.c |  3 ++-
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/lib/transfer.c b/lib/transfer.c
index 792d5aff8..8e66d0d80 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -221,20 +221,21 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, 
int bytes, int *nreadp)
            strlen(endofline_network));
 
 #ifdef CURL_DOES_CONVERSIONS
-    CURLcode result;
-    int length;
-    if(data->set.prefer_ascii) {
-      /* translate the protocol and data */
-      length = nread;
-    }
-    else {
-      /* just translate the protocol portion */
-      length = strlen(hexbuffer);
+    {
+      CURLcode result;
+      int length;
+      if(data->set.prefer_ascii)
+        /* translate the protocol and data */
+        length = nread;
+      else
+        /* just translate the protocol portion */
+        length = (int)strlen(hexbuffer);
+      result = Curl_convert_to_network(data, data->req.upload_fromhere,
+                                       length);
+      /* Curl_convert_to_network calls failf if unsuccessful */
+      if(result)
+        return result;
     }
-    result = Curl_convert_to_network(data, data->req.upload_fromhere, length);
-    /* Curl_convert_to_network calls failf if unsuccessful */
-    if(result)
-      return result;
 #endif /* CURL_DOES_CONVERSIONS */
 
     if((nread - hexlen) == 0)
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index ccaf032c2..2933584b3 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -1478,7 +1478,8 @@ static CURLcode verifyhost(struct connectdata *conn, X509 
*server_cert)
        peer_CN = NULL;
     else {
       /* convert peer_CN from UTF8 */
-      CURLcode rc = Curl_convert_from_utf8(data, peer_CN, strlen(peer_CN));
+      CURLcode rc = Curl_convert_from_utf8(data, (char *)peer_CN,
+                                           strlen((char *)peer_CN));
       /* Curl_convert_from_utf8 calls failf if unsuccessful */
       if(rc) {
         OPENSSL_free(peer_CN);

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]