From 15575e29980a93f59f7d5fc9b1003a7639764f4e Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Wed, 27 Sep 2023 09:13:47 +0300 Subject: tests: fixed compiler warnings --- src/testcurl/test_large_put.c | 2 +- src/testcurl/test_put_header_fold.c | 8 +++++--- src/testcurl/test_quiesce.c | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/testcurl') diff --git a/src/testcurl/test_large_put.c b/src/testcurl/test_large_put.c index 55e64a2f..e478056b 100644 --- a/src/testcurl/test_large_put.c +++ b/src/testcurl/test_large_put.c @@ -741,7 +741,7 @@ testPutExternal (void) if ((WSAEINVAL != WSAGetLastError ()) || (0 != rs.fd_count) || (0 != ws.fd_count) || (0 != es.fd_count) ) externalErrorExitDesc ("Unexpected select() error"); - Sleep (tv.tv_sec * 1000 + tv.tv_usec / 1000); + Sleep ((DWORD) (tv.tv_sec * 1000 + tv.tv_usec / 1000)); #endif } diff --git a/src/testcurl/test_put_header_fold.c b/src/testcurl/test_put_header_fold.c index 3a732952..14fa0d73 100644 --- a/src/testcurl/test_put_header_fold.c +++ b/src/testcurl/test_put_header_fold.c @@ -611,12 +611,14 @@ setupCURL (void *cbc, uint16_t port, #endif /* _DEBUG */ (CURLE_OK != curl_easy_setopt (c, CURLOPT_DEBUGFUNCTION, &libcurl_debug_cb)) || -#if CURL_AT_LEAST_VERSION (7, 19, 4) - (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP)) || -#endif /* CURL_AT_LEAST_VERSION (7, 19, 4) */ #if CURL_AT_LEAST_VERSION (7, 45, 0) (CURLE_OK != curl_easy_setopt (c, CURLOPT_DEFAULT_PROTOCOL, "http")) || #endif /* CURL_AT_LEAST_VERSION (7, 45, 0) */ +#if CURL_AT_LEAST_VERSION (7, 85, 0) + (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS_STR, "http")) || +#elif CURL_AT_LEAST_VERSION (7, 19, 4) + (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP)) || +#endif /* CURL_AT_LEAST_VERSION (7, 19, 4) */ (CURLE_OK != curl_easy_setopt (c, CURLOPT_URL, URL_SCHEME_HOST_PATH)) || (CURLE_OK != curl_easy_setopt (c, CURLOPT_PORT, ((long) port)))) diff --git a/src/testcurl/test_quiesce.c b/src/testcurl/test_quiesce.c index 9ba6adaa..be7b43b7 100644 --- a/src/testcurl/test_quiesce.c +++ b/src/testcurl/test_quiesce.c @@ -347,7 +347,7 @@ ServeOneRequest (void *param) if ((WSAEINVAL != WSAGetLastError ()) || (0 != rs.fd_count) || (0 != ws.fd_count) || (0 != es.fd_count) ) externalErrorExitDesc ("Unexpected select() error"); - Sleep (tv.tv_sec * 1000 + tv.tv_usec / 1000); + Sleep ((DWORD) (tv.tv_sec * 1000 + tv.tv_usec / 1000)); #endif } MHD_run (d); @@ -614,7 +614,7 @@ testExternalGet (void) if ((WSAEINVAL != WSAGetLastError ()) || (0 != rs.fd_count) || (0 != ws.fd_count) || (0 != es.fd_count) ) externalErrorExitDesc ("Unexpected select() error"); - Sleep (tv.tv_sec * 1000 + tv.tv_usec / 1000); + Sleep ((DWORD) (tv.tv_sec * 1000 + tv.tv_usec / 1000)); #endif } curl_multi_perform (multi, &running); -- cgit v1.2.3