From 7c4656317c789d2ce3600cd75bca2a8b718cc00e Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Tue, 18 Sep 2012 23:37:23 +0000 Subject: [PATCH] cpuid on nonx86 has an unused parameter. BUG=none TEST=none Review URL: https://webrtc-codereview.appspot.com/814004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@363 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- README.chromium | 2 +- include/libyuv/version.h | 2 +- source/cpu_id.cc | 10 ++++++---- unit_test/planar_test.cc | 1 + 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.chromium b/README.chromium index fa0a85171..c66338aa1 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 362 +Version: 363 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 531044b39..f5987c29b 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 362 +#define LIBYUV_VERSION 363 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/cpu_id.cc b/source/cpu_id.cc index 3f566ee4e..fb307f045 100644 --- a/source/cpu_id.cc +++ b/source/cpu_id.cc @@ -47,14 +47,16 @@ extern "C" { #endif // Low level cpuid for X86. Returns zeros on other CPUs. -void CpuId(int cpu_info[4], int info_type) { #if !defined(__CLR_VER) && (defined(_M_IX86) || defined(_M_X64) || \ defined(__i386__) || defined(__x86_64__)) +void CpuId(int cpu_info[4], int info_type) { __cpuid(cpu_info, info_type); -#else - cpu_info[0] = cpu_info[1] = cpu_info[2] = cpu_info[3] = 0; -#endif } +#else +void CpuId(int cpu_info[4], int) { + cpu_info[0] = cpu_info[1] = cpu_info[2] = cpu_info[3] = 0; +} +#endif // based on libvpx arm_cpudetect.c // For Arm, but public to allow testing on any CPU diff --git a/unit_test/planar_test.cc b/unit_test/planar_test.cc index 78e5779c4..0cedbe5c3 100644 --- a/unit_test/planar_test.cc +++ b/unit_test/planar_test.cc @@ -702,6 +702,7 @@ TEST_F(libyuvTest, TestARGBColorMatrix) { TEST_F(libyuvTest, TestARGBColorTable) { SIMD_ALIGNED(uint8 orig_pixels[256][4]); + memset(orig_pixels, 0, sizeof(orig_pixels)); // Matrix for Sepia. static const uint8 kARGBTable[256 * 4] = {