From: Kamil Dudka Date: Thu, 12 May 2016 06:36:21 +0000 (+0200) Subject: openssl: fix compile-time warning in Curl_ossl_check_cxn() X-Git-Tag: curl-7_49_0~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea06ad2e31d6842605acd47ece0d4662a04df3a6;p=curl openssl: fix compile-time warning in Curl_ossl_check_cxn() ... introduced in curl-7_48_0-293-g2968c83: Error: COMPILER_WARNING: lib/vtls/openssl.c: scope_hint: In function ‘Curl_ossl_check_cxn’ lib/vtls/openssl.c:767:15: warning: conversion to ‘int’ from ‘ssize_t’ may alter its value [-Wconversion] --- diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index af3c502a7..6b70c0ccc 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -763,7 +763,7 @@ int Curl_ossl_check_cxn(struct connectdata *conn) recv MSG_PEEK instead. Bug #795 */ #ifdef MSG_PEEK char buf; - int nread; + ssize_t nread; nread = recv((RECV_TYPE_ARG1)conn->sock[FIRSTSOCKET], (RECV_TYPE_ARG2)&buf, (RECV_TYPE_ARG3)1, (RECV_TYPE_ARG4)MSG_PEEK); if(nread == 0)