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>
This commit is contained in:
parent
c51a0b74dc
commit
283e0137c7
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue