aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/libtest/lib650.c5
-rw-r--r--tests/server/sockfilt.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/libtest/lib650.c b/tests/libtest/lib650.c
index 056270cfb..79d60b624 100644
--- a/tests/libtest/lib650.c
+++ b/tests/libtest/lib650.c
@@ -62,6 +62,7 @@ int test(char *URL)
struct curl_forms formarray[3];
size_t formlength = 0;
char flbuf[32];
+ long contentlength = 0;
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
@@ -94,11 +95,13 @@ int test(char *URL)
goto test_cleanup;
}
+ contentlength = (long)(strlen(data) - 1);
+
/* Use a form array for the non-copy test. */
formarray[0].option = CURLFORM_PTRCONTENTS;
formarray[0].value = data;
formarray[1].option = CURLFORM_CONTENTSLENGTH;
- formarray[1].value = (char *) strlen(data) - 1;
+ formarray[1].value = (char *)(size_t)contentlength;
formarray[2].option = CURLFORM_END;
formarray[2].value = NULL;
formrc = curl_formadd(&formpost,
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index 2fb947f15..10a16ef00 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -782,8 +782,9 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
wsa++;
}
else {
+ curl_socket_t socket = curlx_sitosk(fds);
WSACloseEvent(wsaevent);
- handle = (HANDLE) curlx_sitosk(fds);
+ handle = (HANDLE) socket;
handle = select_ws_wait(handle, waitevent);
handles[nfd] = handle;
data[thd].thread = handle;