diff options
author | Eric Blake <ebb9@byu.net> | 2009-11-18 21:46:35 -0700 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-11-19 06:39:43 -0700 |
commit | 111e540eb4ee2be2500e81bc14087042afb79b82 (patch) | |
tree | 24721b36a744738bed94b48aaced6eb4c5ba39db /lib | |
parent | 8cfd4a9028280e7205c7d1a70c2709706627e98d (diff) | |
download | gnulib-111e540eb4ee2be2500e81bc14087042afb79b82.tar.gz |
build: avoid compiler warnings
Silence some warnings found on mingw.
* lib/select.c (rpl_select): Delete unused variable.
* lib/setsockopt.c (rpl_setsockopt): Avoid incompatible pointer.
Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/select.c | 2 | ||||
-rw-r--r-- | lib/setsockopt.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/select.c b/lib/select.c index 12d3e519c6..e82bf889f1 100644 --- a/lib/select.c +++ b/lib/select.c @@ -322,8 +322,6 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, /* Classify handles. Create fd sets for sockets, poll the others. */ for (i = 0; i < nfds; i++) { - WSANETWORKEVENTS ev; - if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0) continue; diff --git a/lib/setsockopt.c b/lib/setsockopt.c index 96a00cc2e7..daff382a8a 100644 --- a/lib/setsockopt.c +++ b/lib/setsockopt.c @@ -41,7 +41,8 @@ rpl_setsockopt (int fd, int level, int optname, const void *optval, socklen_t op { const struct timeval *tv = optval; int milliseconds = tv->tv_sec * 1000 + tv->tv_usec / 1000; - r = setsockopt (sock, level, optname, &milliseconds, sizeof (int)); + optval = &milliseconds; + r = setsockopt (sock, level, optname, optval, sizeof (int)); } else { |