From fae11561b472136b41bf18175737b108e7f90f9c Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 12 Oct 2026 23:28:24 +0300
Subject: [PATCH] SDL_hidapi_switch.c: silence -Wmaybe-uninitialized warnings
from old gcc
( cherry picked from commit 332986093c8b71c20f23ae9944ee8cc2c070a28f )
---
src/joystick/hidapi/SDL_hidapi_switch.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/joystick/hidapi/SDL_hidapi_switch.c b/src/joystick/hidapi/SDL_hidapi_switch.c
index 7580385af0eae..dfff56f1187db 100644
--- a/src/joystick/hidapi/SDL_hidapi_switch.c
+++ b/src/joystick/hidapi/SDL_hidapi_switch.c
@@ -960,8 +960,8 @@ static bool SetIMUEnabled(SDL_DriverSwitch_Context *ctx, bool enabled)
static bool LoadStickCalibration(SDL_DriverSwitch_Context *ctx)
{
- Uint8 pLeftStickCal[9];
- Uint8 pRightStickCal[9];
+ Uint8 pLeftStickCal[9] = {0,0,0,0,0,0,0,0,0};
+ Uint8 pRightStickCal[9] = {0,0,0,0,0,0,0,0,0};
bool have_left_stick_cal = false, have_right_stick_cal = false;
size_t stick, axis;
SwitchSubcommandInputPacket_t *user_reply = NULL;