shithub: libvpx

Download patch

ref: d6d3d4ba316ef09faee56aa203f5921ff2637c46
parent: 4d1540f8ce1c9965bc89674ba4e46e332f52599d
author: James Zern <[email protected]>
date: Thu Sep 1 15:48:04 EDT 2016

get_cpu_count: quiet -Wshorten-64-to-32 warnings

sysconf returns a long; cast (unsigned) dwNumberOfProcessors to int for
good measure

Change-Id: I1f181d7bd9a060c0898db41f66a5065394afdc4e

--- a/vp8/common/generic/systemdependent.c
+++ b/vp8/common/generic/systemdependent.c
@@ -37,9 +37,9 @@
 
 #if HAVE_UNISTD_H && !defined(__OS2__)
 #if defined(_SC_NPROCESSORS_ONLN)
-  core_count = sysconf(_SC_NPROCESSORS_ONLN);
+  core_count = (int)sysconf(_SC_NPROCESSORS_ONLN);
 #elif defined(_SC_NPROC_ONLN)
-  core_count = sysconf(_SC_NPROC_ONLN);
+  core_count = (int)sysconf(_SC_NPROC_ONLN);
 #endif
 #elif defined(_WIN32)
   {
@@ -61,7 +61,7 @@
       GetSystemInfo(&sysinfo);
 #endif
 
-    core_count = sysinfo.dwNumberOfProcessors;
+    core_count = (int)sysinfo.dwNumberOfProcessors;
   }
 #elif defined(__OS2__)
   {