mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
Suppress signed vs. unsigned warnings on Win32
This commit is contained in:
parent
765683403f
commit
539e34b5df
10
lib/select.c
10
lib/select.c
@ -98,7 +98,7 @@ int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms)
|
|||||||
fd_set fds_read;
|
fd_set fds_read;
|
||||||
fd_set fds_write;
|
fd_set fds_write;
|
||||||
fd_set fds_err;
|
fd_set fds_err;
|
||||||
int maxfd;
|
curl_socket_t maxfd;
|
||||||
int r;
|
int r;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
|
|||||||
fd_set fds_read;
|
fd_set fds_read;
|
||||||
fd_set fds_write;
|
fd_set fds_write;
|
||||||
fd_set fds_err;
|
fd_set fds_err;
|
||||||
int maxfd;
|
curl_socket_t maxfd;
|
||||||
int r;
|
int r;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
@ -186,12 +186,14 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
|
|||||||
maxfd = -1;
|
maxfd = -1;
|
||||||
|
|
||||||
for (i = 0; i < nfds; i++) {
|
for (i = 0; i < nfds; i++) {
|
||||||
if (ufds[i].fd < 0)
|
if (ufds[i].fd == CURL_SOCKET_BAD)
|
||||||
continue;
|
continue;
|
||||||
|
#ifndef WIN32 /* This is harmless and wrong on Win32 */
|
||||||
if (ufds[i].fd >= FD_SETSIZE) {
|
if (ufds[i].fd >= FD_SETSIZE) {
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (ufds[i].fd > maxfd)
|
if (ufds[i].fd > maxfd)
|
||||||
maxfd = ufds[i].fd;
|
maxfd = ufds[i].fd;
|
||||||
if (ufds[i].events & POLLIN)
|
if (ufds[i].events & POLLIN)
|
||||||
@ -220,7 +222,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
|
|||||||
r = 0;
|
r = 0;
|
||||||
for (i = 0; i < nfds; i++) {
|
for (i = 0; i < nfds; i++) {
|
||||||
ufds[i].revents = 0;
|
ufds[i].revents = 0;
|
||||||
if (ufds[i].fd < 0)
|
if (ufds[i].fd == CURL_SOCKET_BAD)
|
||||||
continue;
|
continue;
|
||||||
if (FD_ISSET(ufds[i].fd, &fds_read))
|
if (FD_ISSET(ufds[i].fd, &fds_read))
|
||||||
ufds[i].revents |= POLLIN;
|
ufds[i].revents |= POLLIN;
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
struct pollfd
|
struct pollfd
|
||||||
{
|
{
|
||||||
int fd;
|
curl_socket_t fd;
|
||||||
short events;
|
short events;
|
||||||
short revents;
|
short revents;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user