From a626fa128cff4a3ac7dd4097328a6d38e659c025 Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Sun, 13 Oct 2019 19:14:39 +0200 Subject: [PATCH] security: silence conversion warning With MinGW-w64, `curl_socket_t` is is a 32 or 64 bit unsigned integer, while `read` expects a 32 bit signed integer. Use `sread` instead of `read` to use the correct parameter type. Closes https://github.com/curl/curl/pull/4483 --- lib/security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/security.c b/lib/security.c index c5e4e135d..fbfa70741 100644 --- a/lib/security.c +++ b/lib/security.c @@ -236,7 +236,7 @@ static ssize_t sec_recv(struct connectdata *conn, int sockindex, /* Handle clear text response. */ if(conn->sec_complete == 0 || conn->data_prot == PROT_CLEAR) - return read(fd, buffer, len); + return sread(fd, buffer, len); if(conn->in_buffer.eof_flag) { conn->in_buffer.eof_flag = 0;