commit 15575e29980a93f59f7d5fc9b1003a7639764f4e
parent dff7ab0d63a155a612a0e2ec569e6250ece0046c
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Wed, 27 Sep 2023 09:13:47 +0300
tests: fixed compiler warnings
Diffstat:
5 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
@@ -1217,7 +1217,7 @@ run_mhd_epoll_loop (struct MHD_Daemon *daemon)
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 (daemon);
diff --git a/src/microhttpd/test_upgrade_large.c b/src/microhttpd/test_upgrade_large.c
@@ -1403,7 +1403,7 @@ run_mhd_epoll_loop (struct MHD_Daemon *daemon)
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
}
if (FD_ISSET (MHD_itc_r_fd_ (kicker), &rs))
diff --git 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
@@ -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
@@ -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);