From 2481ab934039e546efb91c7ce281a10c5efdabbd Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 19 Dec 2019 15:58:16 -0800 Subject: [PATCH] Fixed compiler warning --- src/joystick/hidapi/SDL_hidapijoystick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/joystick/hidapi/SDL_hidapijoystick.c b/src/joystick/hidapi/SDL_hidapijoystick.c index 564a57076..e7f77644e 100644 --- a/src/joystick/hidapi/SDL_hidapijoystick.c +++ b/src/joystick/hidapi/SDL_hidapijoystick.c @@ -918,7 +918,7 @@ HIDAPI_JoystickGetDeviceGUID(int device_index) static SDL_JoystickID HIDAPI_JoystickGetDeviceInstanceID(int device_index) { - SDL_JoystickID joystickID; + SDL_JoystickID joystickID = -1; SDL_LockMutex(SDL_HIDAPI_mutex); HIDAPI_GetDeviceByIndex(device_index, &joystickID); SDL_UnlockMutex(SDL_HIDAPI_mutex);