From 7f3071a2079e03aebbd0ce8fb954524333a4e6a6 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sat, 4 Apr 2026 08:55:10 +0300
Subject: [PATCH] SDL_hidapi_zuiki.c: silence bogus -Warray-bounds warnings
from gcc-4.9
(cherry picked from commit f61a22e10f3272ba8f06ec3b2b5a2160097b2031)
---
src/joystick/hidapi/SDL_hidapi_zuiki.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/joystick/hidapi/SDL_hidapi_zuiki.c b/src/joystick/hidapi/SDL_hidapi_zuiki.c
index ad7f3d80be335..d5958be09dc81 100644
--- a/src/joystick/hidapi/SDL_hidapi_zuiki.c
+++ b/src/joystick/hidapi/SDL_hidapi_zuiki.c
@@ -62,8 +62,8 @@ static float median_filter_update(MedianFilter_t* mf, float input) {
if (mf->count < FILTER_SIZE) mf->count++;
float temp[FILTER_SIZE];
SDL_memcpy(temp, mf->buffer, sizeof(temp));
- for (int i = 0; i < mf->count - 1; i++) {
- for (int j = i + 1; j < mf->count; j++) {
+ for (uint8_t i = 0; i < mf->count - 1; i++) {
+ for (uint8_t j = i + 1; j < mf->count; j++) {
if (temp[i] > temp[j]) {
float t = temp[i];
temp[i] = temp[j];