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 <wtc@google.com>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
This commit is contained in:
Yannis Guyon 2023-10-02 15:03:27 +02:00 committed by libyuv LUCI CQ
parent 3aae5c7fb1
commit a3b9c36eb9

View File

@ -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));