1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

tvnow: silence conversion warnings

MinGW-w64 defaults to targeting Windows 7 now, so GetTickCount64 is
used and the milliseconds are represented as unsigned long long,
leading to a compiler warning when implicitly converting them to long.
This commit is contained in:
Marcel Raad 2019-01-01 18:03:11 +01:00
parent 01ba09e25a
commit 46c89348b9
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ struct timeval tvnow(void)
DWORD milliseconds = GetTickCount();
#endif
now.tv_sec = (long)(milliseconds / 1000);
now.tv_usec = (milliseconds % 1000) * 1000;
now.tv_usec = (long)((milliseconds % 1000) * 1000);
return now;
}

View File

@ -422,7 +422,7 @@ static struct timeval tvnow(void)
DWORD milliseconds = GetTickCount();
#endif
now.tv_sec = (long)(milliseconds / 1000);
now.tv_usec = (milliseconds % 1000) * 1000;
now.tv_usec = (long)((milliseconds % 1000) * 1000);
return now;
}