Fix warnings for mingw
This commit is contained in:
1 parent
70de571dc8
commit
7e0bd8414d
2 files changed
+4
-2
No files matched your search
@@ -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);
|
||||
|
||||
+2
-1
@@ -179,7 +179,8 @@ workeri_get_cpu_count(void)
|
||||
#if defined(_WIN32)
|
||||
SYSTEM_INFO sysinfo;
|
||||
GetSystemInfo(&sysinfo);
|
||||
return sysinfo.dwNumberOfProcessors;
|
||||
assert(sysinfo.dwNumberOfProcessors <= INT_MAX);
|
||||
return (int) sysinfo.dwNumberOfProcessors;
|
||||
#elif defined(M_USE_WORKER_SYSCTL)
|
||||
int nm[2];
|
||||
int count = 0;
|
||||
|
||||
Reference in new issue
Block a user