tests: fixed compiler warnings

This commit is contained in:
Evgeny Grin (Karlson2k)
2023-09-27 09:16:21 +03:00
parent dff7ab0d63
commit 15575e2998
5 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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))
+1 -1
View File
@@ -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
}
+5 -3
View File
@@ -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))))
+2 -2
View File
@@ -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);