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:
Corinna Vinschen 2018-02-07 17:34:59 +01:00
parent c51a0b74dc
commit 283e0137c7
1 changed files with 1 additions and 1 deletions

View File

@ -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)