diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2018-02-07 17:34:59 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2018-02-07 17:35:23 +0100 |
commit | 283e0137c784ef2915c148633fa966ba7810fe70 (patch) | |
tree | 99bb34153b8f24d7a437276a9f3e70e822d4308f | |
parent | c51a0b74dcec39222d5a61189bfe4a6aa73dcf46 (diff) | |
download | cygnal-283e0137c784ef2915c148633fa966ba7810fe70.tar.gz cygnal-283e0137c784ef2915c148633fa966ba7810fe70.tar.bz2 cygnal-283e0137c784ef2915c148633fa966ba7810fe70.zip |
Cygwin: Fix x86 compiler warning
The previous patch introduced a compiler warning on x86.
Given time_t is only 4 bytes on x86 we get a long vs. unsigned long
comparison in timeval_to_ms. Fix it by careful casting.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | winsup/cygwin/times.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc index 198fc32ce..677376e2c 100644 --- a/winsup/cygwin/times.cc +++ b/winsup/cygwin/times.cc @@ -223,7 +223,7 @@ timeval_to_ms (const struct timeval *time_in, DWORD &ms) || time_in->tv_usec >= USPERSEC) return false; if ((time_in->tv_sec == 0 && time_in->tv_usec == 0) - || time_in->tv_sec >= INFINITE / HZ) + || time_in->tv_sec >= (time_t) (INFINITE / HZ)) ms = INFINITE; else ms = time_in->tv_sec * HZ + (time_in->tv_usec + (USPERSEC/HZ) - 1) |