From a3b9c36eb96ee815c938716d7e9703604938f904 Mon Sep 17 00:00:00 2001 From: Yannis Guyon Date: Mon, 2 Oct 2023 15:03:27 +0200 Subject: Fix unused arg errors in ScalePlane*() in Release src_width parameter is used for assertions and unused with NDEBUG. Fix the warning treated as an error when -Wall -Wextra -Werror is used to build that part of the code. BUG=libyuv:967 Change-Id: I4c02ab013e8e2684b3bed5ce9693e1493d7751b9 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4905033 Reviewed-by: Wan-Teh Chang Commit-Queue: Wan-Teh Chang --- source/scale.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/scale.cc b/source/scale.cc index 43d973af..a8c70949 100644 --- a/source/scale.cc +++ b/source/scale.cc @@ -1479,6 +1479,7 @@ static void ScalePlaneUp2_Linear(int src_width, int y; int dy; + (void)src_width; // This function can only scale up by 2 times horizontally. assert(src_width == ((dst_width + 1) / 2)); @@ -1542,6 +1543,7 @@ static void ScalePlaneUp2_Bilinear(int src_width, ScaleRowUp2_Bilinear_Any_C; int x; + (void)src_width; // This function can only scale up by 2 times. assert(src_width == ((dst_width + 1) / 2)); assert(src_height == ((dst_height + 1) / 2)); @@ -1608,6 +1610,7 @@ static void ScalePlaneUp2_12_Linear(int src_width, int y; int dy; + (void)src_width; // This function can only scale up by 2 times horizontally. assert(src_width == ((dst_width + 1) / 2)); @@ -1661,6 +1664,7 @@ static void ScalePlaneUp2_12_Bilinear(int src_width, ScaleRowUp2_Bilinear_16_Any_C; int x; + (void)src_width; // This function can only scale up by 2 times. assert(src_width == ((dst_width + 1) / 2)); assert(src_height == ((dst_height + 1) / 2)); @@ -1709,6 +1713,7 @@ static void ScalePlaneUp2_16_Linear(int src_width, int y; int dy; + (void)src_width; // This function can only scale up by 2 times horizontally. assert(src_width == ((dst_width + 1) / 2)); @@ -1757,6 +1762,7 @@ static void ScalePlaneUp2_16_Bilinear(int src_width, ScaleRowUp2_Bilinear_16_Any_C; int x; + (void)src_width; // This function can only scale up by 2 times. assert(src_width == ((dst_width + 1) / 2)); assert(src_height == ((dst_height + 1) / 2)); -- cgit v1.2.3