From 151c8fbf195b5a7c570f1dbb7c11b9a12fcf2378 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 14 Mar 2020 17:45:00 -0700 Subject: [PATCH] Fixed build error Malte Kie?ling I get a build error in SDL_sysjoystick.c:74 for the merged patch, but its nothing to sweat about, just -Werror=declaration-after-statement doing its usual stuff. --- src/joystick/virtual/SDL_sysjoystick.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/joystick/virtual/SDL_sysjoystick.c b/src/joystick/virtual/SDL_sysjoystick.c index d3d9735c7..28f887150 100644 --- a/src/joystick/virtual/SDL_sysjoystick.c +++ b/src/joystick/virtual/SDL_sysjoystick.c @@ -50,6 +50,9 @@ VIRTUAL_HWDataForIndex(int device_index) static void VIRTUAL_FreeHWData(joystick_hwdata *hwdata) { + joystick_hwdata * cur = g_VJoys; + joystick_hwdata * prev = NULL; + if (!hwdata) { return; } @@ -71,8 +74,6 @@ VIRTUAL_FreeHWData(joystick_hwdata *hwdata) } /* Remove hwdata from SDL-global list */ - joystick_hwdata * cur = g_VJoys; - joystick_hwdata * prev = NULL; while (cur) { if (hwdata == cur) { if (prev) {