From 389c5a55aaf73137a51aa56900a779932855efe6 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 29 Apr 2024 01:35:55 +0200 Subject: [PATCH] tests server sockfilt win32 --- tests/server/sockfilt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index 2f788cfc085c1d..edbf3bb2f999b8 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -176,7 +176,7 @@ static ssize_t read_wincon(int fd, void *buf, size_t count) success = ReadFile(handle, buf, curlx_uztoul(count), &rcount, NULL); } if(success) { - return rcount; + return (ssize_t)rcount; } errno = (int)GetLastError(); @@ -211,7 +211,7 @@ static ssize_t write_wincon(int fd, const void *buf, size_t count) success = WriteFile(handle, buf, curlx_uztoul(count), &wcount, NULL); } if(success) { - return wcount; + return (ssize_t)wcount; } errno = (int)GetLastError(); @@ -665,7 +665,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds, } /* allocate internal array for the internal data */ - data = calloc(nfds, sizeof(struct select_ws_data)); + data = calloc((size_t)nfds, sizeof(struct select_ws_data)); if(!data) { CloseHandle(abort); errno = ENOMEM; @@ -673,7 +673,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds, } /* allocate internal array for the internal event handles */ - handles = calloc(nfds + 1, sizeof(HANDLE)); + handles = calloc((size_t)nfds + 1, sizeof(HANDLE)); if(!handles) { CloseHandle(abort); free(data);