Fix warnings for mingw

This commit is contained in:
Patrick Pelissier committed 2020-06-22 00:33:10 +02:00
1 parent 70de571dc8
commit 7e0bd8414d
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -263,7 +263,8 @@ static inline void m_thread_yield(void)
static inline bool m_thread_sleep(unsigned long long usec)
{
LARGE_INTEGER ft;
ft.QuadPart = -(10ULL*usec);
assert (usec <= LLONG_MAX);
ft.QuadPart = -(10LL*(long long) usec);
HANDLE hd = CreateWaitableTimer(NULL, TRUE, NULL);
M_ASSERT_INIT (hd != NULL, "timer");
SetWaitableTimer(hd, &ft, 0, NULL, NULL, 0);