aom: Assert an aom_img_set_rect call always succeed

From 8834584f65e9058586be7a448786a1fa5e1513a4 Mon Sep 17 00:00:00 2001
From: Wan-Teh Chang <[EMAIL REDACTED]>
Date: Fri, 10 May 2024 15:10:27 -0700
Subject: [PATCH] Assert an aom_img_set_rect call always succeed

The aom_img_set_rect() call at the end of img_alloc_helper() always
succeeds, so assert its return value is equal to 0.

Change-Id: Ia43e967ad5d7dc837a7357f018593802a912cd53
---
 aom/src/aom_image.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/aom/src/aom_image.c b/aom/src/aom_image.c
index 1d3b7df24..c29095cbc 100644
--- a/aom/src/aom_image.c
+++ b/aom/src/aom_image.c
@@ -182,7 +182,9 @@ static aom_image_t *img_alloc_helper(
 
   /* Default viewport to entire image. (This aom_img_set_rect call always
    * succeeds.) */
-  aom_img_set_rect(img, 0, 0, d_w, d_h, border);
+  int ret = aom_img_set_rect(img, 0, 0, d_w, d_h, border);
+  assert(ret == 0);
+  (void)ret;
   return img;
 
 fail: