Fix -Wunused-parameter warnings in release builds

Add (void) casts to the 'src_width' parameters that are only used in
assertions.

Change-Id: I72d1b55f50a9b02b07b206e40e5583005b27928b
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5786606
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
Wan-Teh Chang 2024-08-14 09:18:18 -07:00 committed by Frank Barchard
parent 336e6fd25b
commit 2707098fb1

View File

@ -686,6 +686,7 @@ static void ScaleUVLinearUp2(int src_width,
int dy;
// This function can only scale up by 2 times horizontally.
(void)src_width;
assert(src_width == ((dst_width + 1) / 2));
#ifdef HAS_SCALEUVROWUP2_LINEAR_SSSE3
@ -744,6 +745,7 @@ static void ScaleUVBilinearUp2(int src_width,
int x;
// This function can only scale up by 2 times.
(void)src_width;
assert(src_width == ((dst_width + 1) / 2));
assert(src_height == ((dst_height + 1) / 2));
@ -805,6 +807,7 @@ static void ScaleUVLinearUp2_16(int src_width,
int dy;
// This function can only scale up by 2 times horizontally.
(void)src_width;
assert(src_width == ((dst_width + 1) / 2));
#ifdef HAS_SCALEUVROWUP2_LINEAR_16_SSE41
@ -857,6 +860,7 @@ static void ScaleUVBilinearUp2_16(int src_width,
int x;
// This function can only scale up by 2 times.
(void)src_width;
assert(src_width == ((dst_width + 1) / 2));
assert(src_height == ((dst_height + 1) / 2));