1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

conversions: fix several compiler warnings

This commit is contained in:
Daniel Stenberg 2017-09-11 00:31:12 +02:00
parent 452c906dfd
commit 93843c372f
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 16 additions and 14 deletions

View File

@ -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;
{
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;
}
else {
/* just translate the protocol portion */
length = 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;
#endif /* CURL_DOES_CONVERSIONS */
if((nread - hexlen) == 0)

View File

@ -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);