SDL: The sensor and joystick instance ID generator isn't guarded by a lock.

From 3a47fb7208b6746a36683e394e49c9f711e75133 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 10 Oct 2023 15:46:15 -0700
Subject: [PATCH] The sensor and joystick instance ID generator isn't guarded
 by a lock.

---
 src/joystick/SDL_joystick.c | 2 +-
 src/sensor/SDL_sensor.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index 48385b4b916c..268ba9fc49ea 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -116,7 +116,7 @@ static SDL_bool SDL_joysticks_initialized;
 static SDL_bool SDL_joysticks_quitting;
 static SDL_bool SDL_joystick_being_added;
 static SDL_Joystick *SDL_joysticks SDL_GUARDED_BY(SDL_joystick_lock) = NULL;
-static SDL_AtomicInt SDL_last_joystick_instance_id SDL_GUARDED_BY(SDL_joystick_lock);
+static SDL_AtomicInt SDL_last_joystick_instance_id;
 static int SDL_joystick_player_count SDL_GUARDED_BY(SDL_joystick_lock) = 0;
 static SDL_JoystickID *SDL_joystick_players SDL_GUARDED_BY(SDL_joystick_lock) = NULL;
 static SDL_bool SDL_joystick_allows_background_events = SDL_FALSE;
diff --git a/src/sensor/SDL_sensor.c b/src/sensor/SDL_sensor.c
index 26eed8984fc9..0a186e889dd8 100644
--- a/src/sensor/SDL_sensor.c
+++ b/src/sensor/SDL_sensor.c
@@ -58,7 +58,7 @@ static SDL_AtomicInt SDL_sensor_lock_pending;
 static int SDL_sensors_locked;
 static SDL_bool SDL_sensors_initialized;
 static SDL_Sensor *SDL_sensors SDL_GUARDED_BY(SDL_sensor_lock) = NULL;
-static SDL_AtomicInt SDL_last_sensor_instance_id SDL_GUARDED_BY(SDL_sensor_lock);
+static SDL_AtomicInt SDL_last_sensor_instance_id;
 static char SDL_sensor_magic;
 
 #define CHECK_SENSOR_MAGIC(sensor, retval)              \