aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-06-27 23:40:17 +0200
committerRon Yorston <rmy@pobox.com>2017-08-23 12:35:27 +0100
commit8fa942c9dd98a1921fbffbcb6b3f85fea8eda1c8 (patch)
tree76b9d9be714c1de261312cb81e3429818f9ebd67
parent230944a8f7b03d2b27dd65e2649f2067c31c65ed (diff)
downloadbusybox-w32-8fa942c9dd98a1921fbffbcb6b3f85fea8eda1c8.tar.gz
busybox-w32-8fa942c9dd98a1921fbffbcb6b3f85fea8eda1c8.tar.bz2
busybox-w32-8fa942c9dd98a1921fbffbcb6b3f85fea8eda1c8.zip
win32/select: work around a compiler warning
The `tend` variable is only ever initialized and used if the timeout is *not* infinite. However, GCC is not smart enough to figure that out. So just initialize the variable to 0 and be done with it already. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Ron Yorston <rmy@pobox.com>
-rw-r--r--win32/select.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/select.c b/win32/select.c
index 416174b3e..a7e30182d 100644
--- a/win32/select.c
+++ b/win32/select.c
@@ -252,7 +252,7 @@ mingw_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds,
252 DWORD ret, wait_timeout, nhandles, nsock, nbuffer; 252 DWORD ret, wait_timeout, nhandles, nsock, nbuffer;
253 MSG msg; 253 MSG msg;
254 int i, fd, rc; 254 int i, fd, rc;
255 clock_t tend; 255 clock_t tend = 0;
256 256
257 if (nfds > FD_SETSIZE) 257 if (nfds > FD_SETSIZE)
258 nfds = FD_SETSIZE; 258 nfds = FD_SETSIZE;