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