SDL: fix a few 'unused but set variable' and 'unused function' warnings

From 3d35c085858faab705a75c3065ff151619d2ce28 Mon Sep 17 00:00:00 2001
From: Steven Noonan <[EMAIL REDACTED]>
Date: Sun, 2 Oct 2022 17:30:03 -0700
Subject: [PATCH] fix a few 'unused but set variable' and 'unused function'
 warnings

---
 src/cpuinfo/SDL_cpuinfo.c                  | 4 ----
 src/joystick/windows/SDL_windowsjoystick.c | 3 +--
 src/render/SDL_render.c                    | 2 ++
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c
index c05c88cd46ab..540f6a54e5a8 100644
--- a/src/cpuinfo/SDL_cpuinfo.c
+++ b/src/cpuinfo/SDL_cpuinfo.c
@@ -1152,8 +1152,6 @@ SDL_SIMDRealloc(void *mem, const size_t len)
     }
 
     if (mem) {
-        void **realptr = (void **) mem;
-        realptr--;
         mem = *(((void **) mem) - 1);
 
         /* Check the delta between the real pointer and user pointer */
@@ -1193,8 +1191,6 @@ void
 SDL_SIMDFree(void *ptr)
 {
     if (ptr) {
-        void **realptr = (void **) ptr;
-        realptr--;
         SDL_free(*(((void **) ptr) - 1));
     }
 }
diff --git a/src/joystick/windows/SDL_windowsjoystick.c b/src/joystick/windows/SDL_windowsjoystick.c
index a79e34019efa..ccd8f37bb342 100644
--- a/src/joystick/windows/SDL_windowsjoystick.c
+++ b/src/joystick/windows/SDL_windowsjoystick.c
@@ -522,7 +522,6 @@ WINDOWS_JoystickGetCount(void)
 static void
 WINDOWS_JoystickDetect(void)
 {
-    int device_index = 0;
     JoyStick_DeviceData *pCurList = NULL;
 
     /* only enum the devices if the joystick thread told us something changed */
@@ -570,7 +569,7 @@ WINDOWS_JoystickDetect(void)
         pCurList = pListNext;
     }
 
-    for (device_index = 0, pCurList = SYS_Joystick; pCurList; ++device_index, pCurList = pCurList->pNext) {
+    for (pCurList = SYS_Joystick; pCurList; pCurList = pCurList->pNext) {
         if (pCurList->send_add_event) {
             if (pCurList->bXInputDevice) {
 #if SDL_HAPTIC_XINPUT
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index d2d94f249781..082545ff0823 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -900,6 +900,7 @@ SDL_CreateWindowAndRenderer(int width, int height, Uint32 window_flags,
     return 0;
 }
 
+#if !SDL_RENDER_DISABLED
 static SDL_INLINE
 void VerifyDrawQueueFunctions(const SDL_Renderer *renderer)
 {
@@ -953,6 +954,7 @@ static void SDL_CalculateSimulatedVSyncInterval(SDL_Renderer *renderer, SDL_Wind
     }
     renderer->simulate_vsync_interval = (1000 / refresh_rate);
 }
+#endif
 
 SDL_Renderer *
 SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags)