Skip to content

Commit de4c0c7

Browse files
authored
fix warnings (#780)
1 parent 31f8d13 commit de4c0c7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

contrib/win32/win32compat/inc/sys/select.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ typedef struct w32_fd_set_ {
2727
#define FD_SETSIZE MAX_FDS
2828

2929
int w32_select(int fds, w32_fd_set * , w32_fd_set * , w32_fd_set * ,
30-
const struct timeval *);
30+
const struct w32_timeval *);
3131
#define select(a,b,c,d,e) w32_select((a), (b), (c), (d), (e))
3232

3333

contrib/win32/win32compat/w32fd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "inc\sys\socket.h"
3333
#include "inc\sys\select.h"
3434
#include "inc\sys\uio.h"
35+
#include "inc\sys\time.h"
3536
#include "inc\sys\types.h"
3637
#include "inc\sys\stat.h"
3738
#include "inc\unistd.h"
@@ -728,12 +729,11 @@ w32_fcntl(int fd, int cmd, ... /* arg */)
728729
int
729730
w32_select(int fds, w32_fd_set* readfds, w32_fd_set* writefds, w32_fd_set* exceptfds, const struct timeval *timeout)
730731
{
731-
ULONGLONG ticks_start = GetTickCount64(), ticks_spent;
732+
ULONGLONG ticks_start = GetTickCount64(), ticks_spent, timeout_ms = 0, time_rem = 0;
732733
w32_fd_set read_ready_fds, write_ready_fds;
733734
HANDLE events[SELECT_EVENT_LIMIT];
734735
int num_events = 0;
735736
int in_set_fds = 0, out_ready_fds = 0, i;
736-
unsigned int timeout_ms = 0, time_rem = 0;
737737

738738
errno = 0;
739739
/* TODO - the size of these can be reduced based on fds */
@@ -856,7 +856,7 @@ w32_select(int fds, w32_fd_set* readfds, w32_fd_set* writefds, w32_fd_set* excep
856856
else
857857
time_rem = INFINITE;
858858

859-
if (0 != wait_for_any_event(events, num_events, time_rem))
859+
if (0 != wait_for_any_event(events, num_events, (DWORD)time_rem))
860860
return -1;
861861

862862
/* check on fd status */

0 commit comments

Comments
 (0)