From 2707098fb193d262dc5b082c7b31114f4c765e42 Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Wed, 14 Aug 2024 09:18:18 -0700 Subject: [PATCH] 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 --- source/scale_uv.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/scale_uv.cc b/source/scale_uv.cc index b9db64eef..18ad43491 100644 --- a/source/scale_uv.cc +++ b/source/scale_uv.cc @@ -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));