diff options
author | James Zern <jzern@google.com> | 2016-09-01 19:48:04 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2016-09-01 19:54:00 -0700 |
commit | d6d3d4ba316ef09faee56aa203f5921ff2637c46 (patch) | |
tree | 4e38d9c7f947dd7abf9d00217aaa7d420af2faeb /vp8/common | |
parent | 4d1540f8ce1c9965bc89674ba4e46e332f52599d (diff) | |
download | libvpx-d6d3d4ba316ef09faee56aa203f5921ff2637c46.tar libvpx-d6d3d4ba316ef09faee56aa203f5921ff2637c46.tar.gz libvpx-d6d3d4ba316ef09faee56aa203f5921ff2637c46.tar.bz2 libvpx-d6d3d4ba316ef09faee56aa203f5921ff2637c46.zip |
get_cpu_count: quiet -Wshorten-64-to-32 warnings
sysconf returns a long; cast (unsigned) dwNumberOfProcessors to int for
good measure
Change-Id: I1f181d7bd9a060c0898db41f66a5065394afdc4e
Diffstat (limited to 'vp8/common')
-rw-r--r-- | vp8/common/generic/systemdependent.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vp8/common/generic/systemdependent.c b/vp8/common/generic/systemdependent.c index 0f4bb06b4..89abd41c0 100644 --- a/vp8/common/generic/systemdependent.c +++ b/vp8/common/generic/systemdependent.c @@ -37,9 +37,9 @@ static int get_cpu_count() { #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 @@ static int get_cpu_count() { GetSystemInfo(&sysinfo); #endif - core_count = sysinfo.dwNumberOfProcessors; + core_count = (int)sysinfo.dwNumberOfProcessors; } #elif defined(__OS2__) { |