lib: fix conversion warnings with gcc on macOS
This commit is contained in:
Родитель
954c7dfb91
Коммит
6f93d5f604
|
@ -102,7 +102,7 @@ int main(void)
|
|||
if(timeout.tv_sec > 1)
|
||||
timeout.tv_sec = 1;
|
||||
else
|
||||
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||
timeout.tv_usec = (int)(curl_timeo % 1000) * 1000;
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
|
|
|
@ -38,7 +38,7 @@ static int wait_on_socket(curl_socket_t sockfd, int for_recv, long timeout_ms)
|
|||
int res;
|
||||
|
||||
tv.tv_sec = timeout_ms / 1000;
|
||||
tv.tv_usec = (timeout_ms % 1000) * 1000;
|
||||
tv.tv_usec = (int)(timeout_ms % 1000) * 1000;
|
||||
|
||||
FD_ZERO(&infd);
|
||||
FD_ZERO(&outfd);
|
||||
|
|
|
@ -65,7 +65,7 @@ size_t tool_read_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
|
|||
|
||||
/* wait this long at the most */
|
||||
timeout.tv_sec = wait/1000;
|
||||
timeout.tv_usec = (wait%1000)*1000;
|
||||
timeout.tv_usec = (int)((wait%1000)*1000);
|
||||
|
||||
FD_ZERO(&bits);
|
||||
FD_SET(in->fd, &bits);
|
||||
|
|
|
@ -162,7 +162,7 @@ static int curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
|
|||
}
|
||||
if(timeout_ms != -1) {
|
||||
*timeout = tutil_tvnow();
|
||||
timeout->tv_usec += timeout_ms * 1000;
|
||||
timeout->tv_usec += (int)timeout_ms * 1000;
|
||||
}
|
||||
else {
|
||||
timeout->tv_sec = -1;
|
||||
|
|
|
@ -136,7 +136,7 @@ static int curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
|
|||
(void)multi; /* unused */
|
||||
if(timeout_ms != -1) {
|
||||
*timeout = tutil_tvnow();
|
||||
timeout->tv_usec += timeout_ms * 1000;
|
||||
timeout->tv_usec += (int)timeout_ms * 1000;
|
||||
}
|
||||
else {
|
||||
timeout->tv_sec = -1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче