From 177d344ed7c92876984bc10f7fdd0f105e5637ff Mon Sep 17 00:00:00 2001 From: Frank Barchard Date: Mon, 13 Feb 2017 15:59:01 -0800 Subject: [PATCH] enable unused parameter warning android.mk builds have unused parameter warning on by default. This change for GN makes libyuv build the same way. BUG=libyuv:681 TEST=build on linux with clang and ninja. Change-Id: I76c627d446b96653f147725bca915d94a42ce9a6 Reviewed-on: https://chromium-review.googlesource.com/441194 Reviewed-by: Frank Barchard Commit-Queue: Frank Barchard --- source/cpu_id.cc | 2 ++ unit_test/planar_test.cc | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/source/cpu_id.cc b/source/cpu_id.cc index 272752ddb..9ff932633 100644 --- a/source/cpu_id.cc +++ b/source/cpu_id.cc @@ -95,6 +95,8 @@ void CpuId(uint32 info_eax, uint32 info_ecx, uint32* cpu_info) { #else // (defined(_M_IX86) || defined(_M_X64) ... LIBYUV_API void CpuId(uint32 eax, uint32 ecx, uint32* cpu_info) { + (void)eax; + (void)ecx; cpu_info[0] = cpu_info[1] = cpu_info[2] = cpu_info[3] = 0; } #endif diff --git a/unit_test/planar_test.cc b/unit_test/planar_test.cc index 47ffc3fd9..2d53cc02f 100644 --- a/unit_test/planar_test.cc +++ b/unit_test/planar_test.cc @@ -1173,12 +1173,12 @@ static void TestBlendPlane(int width, MaskCpuFlags(disable_cpu_flags); BlendPlane(src_argb_a + off, width, src_argb_b + off, width, src_argb_alpha + off, width, dst_argb_c + off, width, width, - height); + invert * height); MaskCpuFlags(benchmark_cpu_info); for (int i = 0; i < benchmark_iterations; ++i) { BlendPlane(src_argb_a + off, width, src_argb_b + off, width, src_argb_alpha + off, width, dst_argb_opt + off, width, width, - height); + invert * height); } for (int i = 0; i < kStride * height; ++i) { EXPECT_EQ(dst_argb_c[i + off], dst_argb_opt[i + off]); @@ -1252,14 +1252,15 @@ static void TestI420Blend(int width, I420Blend(src_y0 + off, width, src_u0 + off, kStrideUV, src_v0 + off, kStrideUV, src_y1 + off, width, src_u1 + off, kStrideUV, src_v1 + off, kStrideUV, src_a + off, width, dst_y_c + off, width, - dst_u_c + off, kStrideUV, dst_v_c + off, kStrideUV, width, height); + dst_u_c + off, kStrideUV, dst_v_c + off, kStrideUV, width, + invert * height); MaskCpuFlags(benchmark_cpu_info); for (int i = 0; i < benchmark_iterations; ++i) { I420Blend(src_y0 + off, width, src_u0 + off, kStrideUV, src_v0 + off, kStrideUV, src_y1 + off, width, src_u1 + off, kStrideUV, src_v1 + off, kStrideUV, src_a + off, width, dst_y_opt + off, width, dst_u_opt + off, kStrideUV, dst_v_opt + off, kStrideUV, - width, height); + width, invert * height); } for (int i = 0; i < width * height; ++i) { EXPECT_EQ(dst_y_c[i + off], dst_y_opt[i + off]);