Fixed compiler warning
``` ./src/joystick/SDL_joystick.c:105:12: warning: no previous extern declaration for non-static variable 'SDL_joystick_lock' [-Wmissing-variable-declarations] SDL_mutex *SDL_joystick_lock = NULL; /* This needs to support recursive locks */ ^ ./src/joystick/SDL_joystick.c:105:1: note: declare 'static' if the variable is not intended to be used outside of this translation unit SDL_mutex *SDL_joystick_lock = NULL; /* This needs to support recursive locks */ ^ ``` 1 warning generated. (cherry picked from commit 3b0cd441584ada86c4456afb4e8b3edaf2173073)main
parent
dce2546534
commit
9c9e6e3aa3
|
@ -102,6 +102,10 @@ static SDL_JoystickDriver *SDL_joystick_drivers[] = {
|
||||||
&SDL_DUMMY_JoystickDriver
|
&SDL_DUMMY_JoystickDriver
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef SDL_THREAD_SAFETY_ANALYSIS
|
||||||
|
static
|
||||||
|
#endif
|
||||||
SDL_mutex *SDL_joystick_lock = NULL; /* This needs to support recursive locks */
|
SDL_mutex *SDL_joystick_lock = NULL; /* This needs to support recursive locks */
|
||||||
static int SDL_joysticks_locked;
|
static int SDL_joysticks_locked;
|
||||||
static SDL_bool SDL_joysticks_initialized;
|
static SDL_bool SDL_joysticks_initialized;
|
||||||
|
|
|
@ -49,6 +49,9 @@ typedef struct SDL_HIDAPI_RumbleContext
|
||||||
SDL_HIDAPI_RumbleRequest *requests_tail;
|
SDL_HIDAPI_RumbleRequest *requests_tail;
|
||||||
} SDL_HIDAPI_RumbleContext;
|
} SDL_HIDAPI_RumbleContext;
|
||||||
|
|
||||||
|
#ifndef SDL_THREAD_SAFETY_ANALYSIS
|
||||||
|
static
|
||||||
|
#endif
|
||||||
SDL_mutex *SDL_HIDAPI_rumble_lock;
|
SDL_mutex *SDL_HIDAPI_rumble_lock;
|
||||||
static SDL_HIDAPI_RumbleContext rumble_context SDL_GUARDED_BY(SDL_HIDAPI_rumble_lock);
|
static SDL_HIDAPI_RumbleContext rumble_context SDL_GUARDED_BY(SDL_HIDAPI_rumble_lock);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue