From 9b065bf54bfb2a815ae8db4bf76bc81466314e9e Mon Sep 17 00:00:00 2001
From: Sylvain <[EMAIL REDACTED]>
Date: Mon, 6 Mar 2023 12:04:59 +0100
Subject: [PATCH] Fix various warnings: static /void / comma
---
src/audio/SDL_wave.c | 6 ++---
src/audio/pipewire/SDL_pipewire.c | 28 ++++++++++++------------
src/audio/pulseaudio/SDL_pulseaudio.c | 2 +-
src/core/linux/SDL_evdev_kbd.c | 6 ++---
src/core/linux/SDL_fcitx.c | 6 ++---
src/core/linux/SDL_ime.c | 4 ++--
src/core/linux/SDL_threadprio.c | 8 +++----
src/events/SDL_events.c | 8 +++----
src/events/SDL_keysym_to_scancode.c | 1 +
src/events/SDL_mouse.c | 2 +-
src/joystick/SDL_gamepad.c | 2 +-
src/joystick/SDL_joystick.c | 8 +++----
src/render/opengles2/SDL_shaders_gles2.c | 2 +-
src/sensor/SDL_sensor.c | 2 +-
src/test/SDL_test_assert.c | 6 ++---
src/thread/SDL_thread.c | 6 ++---
src/video/SDL_blit.c | 4 ++--
src/video/SDL_stretch.c | 4 ++--
src/video/SDL_video.c | 8 +++----
src/video/SDL_yuv.c | 2 +-
src/video/dummy/SDL_nullvideo.c | 2 +-
src/video/wayland/SDL_waylandevents.c | 10 ++++-----
src/video/wayland/SDL_waylandmouse.c | 2 +-
src/video/wayland/SDL_waylandsym.h | 4 ++--
src/video/wayland/SDL_waylandvideo.c | 2 +-
src/video/wayland/SDL_waylandwindow.c | 2 +-
src/video/x11/SDL_x11mouse.c | 4 ++--
src/video/x11/SDL_x11sym.h | 2 +-
src/video/x11/SDL_x11video.c | 2 +-
src/video/x11/SDL_x11xfixes.c | 2 +-
src/video/x11/SDL_x11xinput2.c | 4 ++--
31 files changed, 76 insertions(+), 75 deletions(-)
diff --git a/src/audio/SDL_wave.c b/src/audio/SDL_wave.c
index 8b8cd34c0b75..8d8b533ccb0c 100644
--- a/src/audio/SDL_wave.c
+++ b/src/audio/SDL_wave.c
@@ -1436,7 +1436,7 @@ static int PCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
return 0;
}
-static WaveRiffSizeHint WaveGetRiffSizeHint()
+static WaveRiffSizeHint WaveGetRiffSizeHint(void)
{
const char *hint = SDL_GetHint(SDL_HINT_WAVE_RIFF_CHUNK_SIZE);
@@ -1455,7 +1455,7 @@ static WaveRiffSizeHint WaveGetRiffSizeHint()
return RiffSizeNoHint;
}
-static WaveTruncationHint WaveGetTruncationHint()
+static WaveTruncationHint WaveGetTruncationHint(void)
{
const char *hint = SDL_GetHint(SDL_HINT_WAVE_TRUNCATION);
@@ -1474,7 +1474,7 @@ static WaveTruncationHint WaveGetTruncationHint()
return TruncNoHint;
}
-static WaveFactChunkHint WaveGetFactChunkHint()
+static WaveFactChunkHint WaveGetFactChunkHint(void)
{
const char *hint = SDL_GetHint(SDL_HINT_WAVE_FACT_CHUNK);
diff --git a/src/audio/pipewire/SDL_pipewire.c b/src/audio/pipewire/SDL_pipewire.c
index adc8804ff5ef..2387501c7a8f 100644
--- a/src/audio/pipewire/SDL_pipewire.c
+++ b/src/audio/pipewire/SDL_pipewire.c
@@ -139,13 +139,13 @@ static int pipewire_dlsym(const char *fn, void **addr)
return -1; \
}
-static int load_pipewire_library()
+static int load_pipewire_library(void)
{
pipewire_handle = SDL_LoadObject(pipewire_library);
return pipewire_handle != NULL ? 0 : -1;
}
-static void unload_pipewire_library()
+static void unload_pipewire_library(void)
{
if (pipewire_handle) {
SDL_UnloadObject(pipewire_handle);
@@ -157,18 +157,18 @@ static void unload_pipewire_library()
#define SDL_PIPEWIRE_SYM(x) PIPEWIRE_##x = x
-static int load_pipewire_library()
+static int load_pipewire_library(void)
{
return 0;
}
-static void unload_pipewire_library()
+static void unload_pipewire_library(void)
{ /* Nothing to do */
}
#endif /* SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC */
-static int load_pipewire_syms()
+static int load_pipewire_syms(void)
{
SDL_PIPEWIRE_SYM(pw_get_library_version);
SDL_PIPEWIRE_SYM(pw_init);
@@ -209,7 +209,7 @@ SDL_FORCE_INLINE SDL_bool pipewire_version_at_least(int major, int minor, int pa
(pipewire_version_major > major || pipewire_version_minor > minor || pipewire_version_patch >= patch);
}
-static int init_pipewire_library()
+static int init_pipewire_library(void)
{
if (!load_pipewire_library()) {
if (!load_pipewire_syms()) {
@@ -231,7 +231,7 @@ static int init_pipewire_library()
return -1;
}
-static void deinit_pipewire_library()
+static void deinit_pipewire_library(void)
{
PIPEWIRE_pw_deinit();
unload_pipewire_library();
@@ -337,7 +337,7 @@ static void io_list_remove(Uint32 id)
}
}
-static void io_list_sort()
+static void io_list_sort(void)
{
struct io_node *default_sink = NULL, *default_source = NULL;
struct io_node *n, *temp;
@@ -362,7 +362,7 @@ static void io_list_sort()
}
}
-static void io_list_clear()
+static void io_list_clear(void)
{
struct io_node *n, *temp;
@@ -423,7 +423,7 @@ static void pending_list_remove(Uint32 id)
}
}
-static void pending_list_clear()
+static void pending_list_clear(void)
{
struct node_object *node, *temp;
@@ -748,7 +748,7 @@ static const struct pw_registry_events registry_events = { PW_VERSION_REGISTRY_E
.global_remove = registry_event_remove_callback };
/* The hotplug thread */
-static int hotplug_loop_init()
+static int hotplug_loop_init(void)
{
int res;
@@ -791,7 +791,7 @@ static int hotplug_loop_init()
return 0;
}
-static void hotplug_loop_destroy()
+static void hotplug_loop_destroy(void)
{
if (hotplug_loop) {
PIPEWIRE_pw_thread_loop_stop(hotplug_loop);
@@ -833,7 +833,7 @@ static void hotplug_loop_destroy()
}
}
-static void PIPEWIRE_DetectDevices()
+static void PIPEWIRE_DetectDevices(void)
{
struct io_node *io;
@@ -1333,7 +1333,7 @@ static int PIPEWIRE_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int is
return ret;
}
-static void PIPEWIRE_Deinitialize()
+static void PIPEWIRE_Deinitialize(void)
{
if (pipewire_initialized) {
hotplug_loop_destroy();
diff --git a/src/audio/pulseaudio/SDL_pulseaudio.c b/src/audio/pulseaudio/SDL_pulseaudio.c
index 93944525f963..8c218ba7638b 100644
--- a/src/audio/pulseaudio/SDL_pulseaudio.c
+++ b/src/audio/pulseaudio/SDL_pulseaudio.c
@@ -802,7 +802,7 @@ static int SDLCALL HotplugThread(void *data)
return 0;
}
-static void PULSEAUDIO_DetectDevices()
+static void PULSEAUDIO_DetectDevices(void)
{
WaitForPulseOperation(hotplug_mainloop, PULSEAUDIO_pa_context_get_server_info(hotplug_context, ServerInfoCallback, NULL));
WaitForPulseOperation(hotplug_mainloop, PULSEAUDIO_pa_context_get_sink_info_list(hotplug_context, SinkInfoCallback, (void *)((intptr_t)SDL_TRUE)));
diff --git a/src/core/linux/SDL_evdev_kbd.c b/src/core/linux/SDL_evdev_kbd.c
index e6e4fb3b3590..026609b460b5 100644
--- a/src/core/linux/SDL_evdev_kbd.c
+++ b/src/core/linux/SDL_evdev_kbd.c
@@ -181,8 +181,8 @@ static void SDL_EVDEV_kbd_reraise_signal(int sig)
(void)raise(sig);
}
-siginfo_t *SDL_EVDEV_kdb_cleanup_siginfo = NULL;
-void *SDL_EVDEV_kdb_cleanup_ucontext = NULL;
+static siginfo_t *SDL_EVDEV_kdb_cleanup_siginfo = NULL;
+static void *SDL_EVDEV_kdb_cleanup_ucontext = NULL;
static void kbd_cleanup_signal_action(int signum, siginfo_t *info, void *ucontext)
{
@@ -208,7 +208,7 @@ static void kbd_cleanup_signal_action(int signum, siginfo_t *info, void *ucontex
SDL_EVDEV_kbd_reraise_signal(signum);
}
-static void kbd_unregister_emerg_cleanup()
+static void kbd_unregister_emerg_cleanup(void)
{
int tabidx;
diff --git a/src/core/linux/SDL_fcitx.c b/src/core/linux/SDL_fcitx.c
index 103d55cc5880..7ce6f02285a3 100644
--- a/src/core/linux/SDL_fcitx.c
+++ b/src/core/linux/SDL_fcitx.c
@@ -53,7 +53,7 @@ typedef struct FcitxClient
static FcitxClient fcitx_client;
-static char *GetAppName()
+static char *GetAppName(void)
{
#if defined(__LINUX__) || defined(__FREEBSD__)
char *spot;
@@ -367,7 +367,7 @@ static Uint32 Fcitx_ModState(void)
}
SDL_bool
-SDL_Fcitx_Init()
+SDL_Fcitx_Init(void)
{
fcitx_client.dbus = SDL_DBus_GetContext();
@@ -379,7 +379,7 @@ SDL_Fcitx_Init()
return FcitxClientCreateIC(&fcitx_client);
}
-void SDL_Fcitx_Quit()
+void SDL_Fcitx_Quit(void)
{
FcitxClientICCallMethod(&fcitx_client, "DestroyIC");
if (fcitx_client.ic_path) {
diff --git a/src/core/linux/SDL_ime.c b/src/core/linux/SDL_ime.c
index 36cdbc5263fc..873709b05b4f 100644
--- a/src/core/linux/SDL_ime.c
+++ b/src/core/linux/SDL_ime.c
@@ -40,7 +40,7 @@ static SDL_IME_ProcessKeyEvent_t SDL_IME_ProcessKeyEvent_Real = NULL;
static SDL_IME_UpdateTextRect_t SDL_IME_UpdateTextRect_Real = NULL;
static SDL_IME_PumpEvents_t SDL_IME_PumpEvents_Real = NULL;
-static void InitIME()
+static void InitIME(void)
{
static SDL_bool inited = SDL_FALSE;
#ifdef HAVE_FCITX
@@ -144,7 +144,7 @@ void SDL_IME_UpdateTextRect(const SDL_Rect *rect)
}
}
-void SDL_IME_PumpEvents()
+void SDL_IME_PumpEvents(void)
{
if (SDL_IME_PumpEvents_Real) {
SDL_IME_PumpEvents_Real();
diff --git a/src/core/linux/SDL_threadprio.c b/src/core/linux/SDL_threadprio.c
index 4543d8da8c17..cc690853de34 100644
--- a/src/core/linux/SDL_threadprio.c
+++ b/src/core/linux/SDL_threadprio.c
@@ -74,7 +74,7 @@ static SDL_bool realtime_portal_supported(DBusConnection *conn)
"RTTimeUSecMax", DBUS_TYPE_INT64, &res);
}
-static void set_rtkit_interface()
+static void set_rtkit_interface(void)
{
SDL_DBusContext *dbus = SDL_DBus_GetContext();
@@ -92,7 +92,7 @@ static void set_rtkit_interface()
}
}
-static DBusConnection *get_rtkit_dbus_connection()
+static DBusConnection *get_rtkit_dbus_connection(void)
{
SDL_DBusContext *dbus = SDL_DBus_GetContext();
@@ -103,7 +103,7 @@ static DBusConnection *get_rtkit_dbus_connection()
return NULL;
}
-static void rtkit_initialize()
+static void rtkit_initialize(void)
{
DBusConnection *dbus_conn;
@@ -129,7 +129,7 @@ static void rtkit_initialize()
}
}
-static SDL_bool rtkit_initialize_realtime_thread()
+static SDL_bool rtkit_initialize_realtime_thread(void)
{
// Following is an excerpt from rtkit README that outlines the requirements
// a thread must meet before making rtkit requests:
diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c
index 87152d0e6485..669c0801c446 100644
--- a/src/events/SDL_events.c
+++ b/src/events/SDL_events.c
@@ -665,7 +665,7 @@ static void SDL_CutEvent(SDL_EventEntry *entry)
SDL_AtomicAdd(&SDL_EventQ.count, -1);
}
-static int SDL_SendWakeupEvent()
+static int SDL_SendWakeupEvent(void)
{
SDL_VideoDevice *_this = SDL_GetVideoDevice();
if (_this == NULL || !_this->SendWakeupEvent) {
@@ -875,7 +875,7 @@ static void SDL_PumpEventsInternal(SDL_bool push_sentinel)
}
}
-void SDL_PumpEvents()
+void SDL_PumpEvents(void)
{
SDL_PumpEventsInternal(SDL_FALSE);
}
@@ -887,7 +887,7 @@ int SDL_PollEvent(SDL_Event *event)
return SDL_WaitEventTimeoutNS(event, 0);
}
-static SDL_bool SDL_events_need_periodic_poll()
+static SDL_bool SDL_events_need_periodic_poll(void)
{
SDL_bool need_periodic_poll = SDL_FALSE;
@@ -970,7 +970,7 @@ static int SDL_WaitEventTimeout_Device(_THIS, SDL_Window *wakeup_window, SDL_Eve
return 0;
}
-static SDL_bool SDL_events_need_polling()
+static SDL_bool SDL_events_need_polling(void)
{
SDL_bool need_polling = SDL_FALSE;
diff --git a/src/events/SDL_keysym_to_scancode.c b/src/events/SDL_keysym_to_scancode.c
index 3379d664de56..fbd9fc72f536 100644
--- a/src/events/SDL_keysym_to_scancode.c
+++ b/src/events/SDL_keysym_to_scancode.c
@@ -24,6 +24,7 @@
#include "SDL_keyboard_c.h"
#include "SDL_scancode_tables_c.h"
+#include "SDL_keysym_to_scancode_c.h"
/* *INDENT-OFF* */ /* clang-format off */
static const struct {
diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c
index 869b8672e9d8..4ff9b87580cd 100644
--- a/src/events/SDL_mouse.c
+++ b/src/events/SDL_mouse.c
@@ -1073,7 +1073,7 @@ int SDL_SetRelativeMouseMode(SDL_bool enabled)
}
SDL_bool
-SDL_GetRelativeMouseMode()
+SDL_GetRelativeMouseMode(void)
{
SDL_Mouse *mouse = SDL_GetMouse();
diff --git a/src/joystick/SDL_gamepad.c b/src/joystick/SDL_gamepad.c
index 12cc397bebc5..a732e880b7a0 100644
--- a/src/joystick/SDL_gamepad.c
+++ b/src/joystick/SDL_gamepad.c
@@ -1804,7 +1804,7 @@ char *SDL_GetGamepadMapping(SDL_Gamepad *gamepad)
return retval;
}
-static void SDL_LoadGamepadHints()
+static void SDL_LoadGamepadHints(void)
{
const char *hint = SDL_GetHint(SDL_HINT_GAMECONTROLLERCONFIG);
if (hint && hint[0]) {
diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index 63a8842bb50e..0013a474adfb 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -196,7 +196,7 @@ static SDL_bool SDL_GetDriverAndJoystickIndex(SDL_JoystickID instance_id, SDL_Jo
return SDL_FALSE;
}
-static int SDL_FindFreePlayerIndex()
+static int SDL_FindFreePlayerIndex(void)
{
int player_index;
@@ -395,7 +395,7 @@ SDL_JoystickID *SDL_GetJoysticks(int *count)
* Return the next available joystick instance ID
* This may be called by drivers from multiple threads, unprotected by any locks
*/
-SDL_JoystickID SDL_GetNextJoystickInstanceID()
+SDL_JoystickID SDL_GetNextJoystickInstanceID(void)
{
return SDL_AtomicIncRef(&SDL_last_joystick_instance_id) + 1;
}
@@ -1319,7 +1319,7 @@ void SDL_QuitJoysticks(void)
SDL_UnlockJoysticks();
}
-static SDL_bool SDL_PrivateJoystickShouldIgnoreEvent()
+static SDL_bool SDL_PrivateJoystickShouldIgnoreEvent(void)
{
if (SDL_joystick_allows_background_events) {
return SDL_FALSE;
@@ -1726,7 +1726,7 @@ void SDL_SetJoystickEventsEnabled(SDL_bool enabled)
#endif /* SDL_EVENTS_DISABLED */
}
-SDL_bool SDL_JoystickEventsEnabled()
+SDL_bool SDL_JoystickEventsEnabled(void)
{
SDL_bool enabled = SDL_FALSE;
diff --git a/src/render/opengles2/SDL_shaders_gles2.c b/src/render/opengles2/SDL_shaders_gles2.c
index c71356295c8f..6055bf77238f 100644
--- a/src/render/opengles2/SDL_shaders_gles2.c
+++ b/src/render/opengles2/SDL_shaders_gles2.c
@@ -377,7 +377,7 @@ const char *GLES2_GetShaderInclude(GLES2_ShaderIncludeType type)
}
}
-GLES2_ShaderIncludeType GLES2_GetTexCoordPrecisionEnumFromHint()
+GLES2_ShaderIncludeType GLES2_GetTexCoordPrecisionEnumFromHint(void)
{
const char *texcoord_hint = SDL_GetHint("SDL_RENDER_OPENGLES2_TEXCOORD_PRECISION");
GLES2_ShaderIncludeType value = GLES2_SHADER_FRAGMENT_INCLUDE_BEST_TEXCOORD_PRECISION;
diff --git a/src/sensor/SDL_sensor.c b/src/sensor/SDL_sensor.c
index d974b39c27a1..31391b40ee9a 100644
--- a/src/sensor/SDL_sensor.c
+++ b/src/sensor/SDL_sensor.c
@@ -149,7 +149,7 @@ SDL_SensorID *SDL_GetSensors(int *count)
* Return the next available sensor instance ID
* This may be called by drivers from multiple threads, unprotected by any locks
*/
-SDL_SensorID SDL_GetNextSensorInstanceID()
+SDL_SensorID SDL_GetNextSensorInstanceID(void)
{
return SDL_AtomicIncRef(&SDL_last_sensor_instance_id) + 1;
}
diff --git a/src/test/SDL_test_assert.c b/src/test/SDL_test_assert.c
index a62816950cba..bfe6955c4bbd 100644
--- a/src/test/SDL_test_assert.c
+++ b/src/test/SDL_test_assert.c
@@ -104,7 +104,7 @@ void SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription,
/*
* Resets the assert summary counters to zero.
*/
-void SDLTest_ResetAssertSummary()
+void SDLTest_ResetAssertSummary(void)
{
SDLTest_AssertsPassed = 0;
SDLTest_AssertsFailed = 0;
@@ -114,7 +114,7 @@ void SDLTest_ResetAssertSummary()
* Logs summary of all assertions (total, pass, fail) since last reset
* as INFO (failed==0) or ERROR (failed > 0).
*/
-void SDLTest_LogAssertSummary()
+void SDLTest_LogAssertSummary(void)
{
int totalAsserts = SDLTest_AssertsPassed + SDLTest_AssertsFailed;
if (SDLTest_AssertsFailed == 0) {
@@ -127,7 +127,7 @@ void SDLTest_LogAssertSummary()
/*
* Converts the current assert state into a test result
*/
-int SDLTest_AssertSummaryToTestResult()
+int SDLTest_AssertSummaryToTestResult(void)
{
if (SDLTest_AssertsFailed > 0) {
return TEST_RESULT_FAILED;
diff --git a/src/thread/SDL_thread.c b/src/thread/SDL_thread.c
index 2381b5acd218..7dbc1bcb0c18 100644
--- a/src/thread/SDL_thread.c
+++ b/src/thread/SDL_thread.c
@@ -27,7 +27,7 @@
#include "../SDL_error_c.h"
SDL_TLSID
-SDL_TLSCreate()
+SDL_TLSCreate(void)
{
static SDL_atomic_t SDL_tls_id;
return SDL_AtomicIncRef(&SDL_tls_id) + 1;
@@ -78,7 +78,7 @@ int SDL_TLSSet(SDL_TLSID id, const void *value, void(SDLCALL *destructor)(void *
return 0;
}
-void SDL_TLSCleanup()
+void SDL_TLSCleanup(void)
{
SDL_TLSData *storage;
@@ -194,7 +194,7 @@ int SDL_Generic_SetTLSData(SDL_TLSData *data)
}
/* Non-thread-safe global error variable */
-static SDL_error *SDL_GetStaticErrBuf()
+static SDL_error *SDL_GetStaticErrBuf(void)
{
static SDL_error SDL_global_error;
static char SDL_global_error_str[128];
diff --git a/src/video/SDL_blit.c b/src/video/SDL_blit.c
index 9d0466ecb1b2..c9540dac7884 100644
--- a/src/video/SDL_blit.c
+++ b/src/video/SDL_blit.c
@@ -102,7 +102,7 @@ static int SDLCALL SDL_SoftBlit(SDL_Surface *src, SDL_Rect *srcrect,
#ifdef __MACOS__
#include <sys/sysctl.h>
-static SDL_bool SDL_UseAltivecPrefetch()
+static SDL_bool SDL_UseAltivecPrefetch(void)
{
const char key[] = "hw.l3cachesize";
u_int64_t result = 0;
@@ -115,7 +115,7 @@ static SDL_bool SDL_UseAltivecPrefetch()
}
}
#else
-static SDL_bool SDL_UseAltivecPrefetch()
+static SDL_bool SDL_UseAltivecPrefetch(void)
{
/* Just guess G4 */
return SDL_TRUE;
diff --git a/src/video/SDL_stretch.c b/src/video/SDL_stretch.c
index 65bc140d1627..05cf102622be 100644
--- a/src/video/SDL_stretch.c
+++ b/src/video/SDL_stretch.c
@@ -362,7 +362,7 @@ static void printf_128(const char *str, __m128i var)
}
#endif
-static SDL_INLINE int hasSSE2()
+static SDL_INLINE int hasSSE2(void)
{
static int val = -1;
if (val != -1) {
@@ -531,7 +531,7 @@ static int scale_mat_SSE(const Uint32 *src, int src_w, int src_h, int src_pitch,
#if defined(HAVE_NEON_INTRINSICS)
-static SDL_INLINE int hasNEON()
+static SDL_INLINE int hasNEON(void)
{
static int val = -1;
if (val != -1) {
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 742b4fc2c759..9a9950d8f05e 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -3285,7 +3285,7 @@ void SDL_DestroyWindow(SDL_Window *window)
SDL_free(window);
}
-SDL_bool SDL_ScreenSaverEnabled()
+SDL_bool SDL_ScreenSaverEnabled(void)
{
if (_this == NULL) {
return SDL_TRUE;
@@ -3293,7 +3293,7 @@ SDL_bool SDL_ScreenSaverEnabled()
return _this->suspend_screensaver ? SDL_FALSE : SDL_TRUE;
}
-int SDL_EnableScreenSaver()
+int SDL_EnableScreenSaver(void)
{
if (_this == NULL) {
return 0;
@@ -3309,7 +3309,7 @@ int SDL_EnableScreenSaver()
return SDL_Unsupported();
}
-int SDL_DisableScreenSaver()
+int SDL_DisableScreenSaver(void)
{
if (_this == NULL) {
return 0;
@@ -3594,7 +3594,7 @@ void SDL_EGL_SetEGLAttributeCallbacks(SDL_EGLAttribArrayCallback platformAttribC
_this->egl_contextattrib_callback = contextAttribCallback;
}
-void SDL_GL_ResetAttributes()
+void SDL_GL_ResetAttributes(void)
{
if (_this == NULL) {
return;
diff --git a/src/video/SDL_yuv.c b/src/video/SDL_yuv.c
index 0a603aba4387..2df6f64e43e1 100644
--- a/src/video/SDL_yuv.c
+++ b/src/video/SDL_yuv.c
@@ -38,7 +38,7 @@ void SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode)
SDL_YUV_ConversionMode = mode;
}
-SDL_YUV_CONVERSION_MODE SDL_GetYUVConversionMode()
+SDL_YUV_CONVERSION_MODE SDL_GetYUVConversionMode(void)
{
return SDL_YUV_ConversionMode;
}
diff --git a/src/video/dummy/SDL_nullvideo.c b/src/video/dummy/SDL_nullvideo.c
index f936c8d29ea1..d1643d119a37 100644
--- a/src/video/dummy/SDL_nullvideo.c
+++ b/src/video/dummy/SDL_nullvideo.c
@@ -128,7 +128,7 @@ VideoBootStrap DUMMY_evdev_bootstrap = {
DUMMY_CreateDevice
};
void SDL_EVDEV_Init(void);
-void SDL_EVDEV_Poll();
+void SDL_EVDEV_Poll(void);
void SDL_EVDEV_Quit(void);
static void DUMMY_EVDEV_Poll(_THIS)
{
diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c
index 56ae6ca34e13..1d05b2cd45ed 100644
--- a/src/video/wayland/SDL_waylandevents.c
+++ b/src/video/wayland/SDL_waylandevents.c
@@ -179,7 +179,7 @@ static struct wl_surface *touch_surface(SDL_TouchID id)
return NULL;
}
-Uint64 Wayland_GetEventTimestamp(Uint64 nsTimestamp)
+static Uint64 Wayland_GetEventTimestamp(Uint64 nsTimestamp)
{
static Uint64 last;
static Uint64 timestamp_offset;
@@ -2328,7 +2328,7 @@ static void tablet_tool_handle_proximity_out(void *data, struct zwp_tablet_tool_
}
}
-uint32_t tablet_tool_btn_to_sdl_button(struct SDL_WaylandTabletInput *input)
+static uint32_t tablet_tool_btn_to_sdl_button(struct SDL_WaylandTabletInput *input)
{
unsigned int tool_btn = input->btn_stylus3 << 2 | input->btn_stylus2 << 1 | input->btn_stylus << 0;
switch (tool_btn) {
@@ -2477,7 +2477,7 @@ static const struct zwp_tablet_tool_v2_listener tablet_tool_listener = {
tablet_tool_handle_frame
};
-struct SDL_WaylandTabletObjectListNode *tablet_object_list_new_node(void *object)
+static struct SDL_WaylandTabletObjectListNode *tablet_object_list_new_node(void *object)
{
struct SDL_WaylandTabletObjectListNode *node;
@@ -2492,7 +2492,7 @@ struct SDL_WaylandTabletObjectListNode *tablet_object_list_new_node(void *object
return node;
}
-void tablet_object_list_append(struct SDL_WaylandTabletObjectListNode *head, void *object)
+static void tablet_object_list_append(struct SDL_WaylandTabletObjectListNode *head, void *object)
{
if (head->object == NULL) {
head->object = object;
@@ -2506,7 +2506,7 @@ void tablet_object_list_append(struct SDL_WaylandTabletObjectListNode *head, voi
head->next = tablet_object_list_new_node(object);
}
-void tablet_object_list_destroy(struct SDL_WaylandTabletObjectListNode *head, void (*deleter)(void *object))
+static void tablet_object_list_destroy(struct SDL_WaylandTabletObjectListNode *head, void (*deleter)(void *object))
{
while (head) {
struct SDL_WaylandTabletObjectListNode *next = head->next;
diff --git a/src/video/wayland/SDL_waylandmouse.c b/src/video/wayland/SDL_waylandmouse.c
index da36b25633b6..ac9cd257e7cc 100644
--- a/src/video/wayland/SDL_waylandmouse.c
+++ b/src/video/wayland/SDL_waylandmouse.c
@@ -448,7 +448,7 @@ static SDL_Cursor *Wayland_CreateSystemCursor(SDL_SystemCursor id)
return cursor;
}
-static SDL_Cursor *Wayland_CreateDefaultCursor()
+static SDL_Cursor *Wayland_CreateDefaultCursor(void)
{
return Wayland_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW);
}
diff --git a/src/video/wayland/SDL_waylandsym.h b/src/video/wayland/SDL_waylandsym.h
index 481eeab27ba0..f2836667bc19 100644
--- a/src/video/wayland/SDL_waylandsym.h
+++ b/src/video/wayland/SDL_waylandsym.h
@@ -92,7 +92,7 @@ SDL_WAYLAND_SYM(struct wl_proxy*, wl_proxy_marshal_array_flags, (struct wl_proxy
#if 0 /* TODO RECONNECT: See waylandvideo.c for more information! */
#if SDL_WAYLAND_CHECK_VERSION(broken, on, purpose)
-SDL_WAYLAND_SYM(int, wl_display_reconnect, (struct wl_display*));
+SDL_WAYLAND_SYM(int, wl_display_reconnect, (struct wl_display*))
#endif
#endif /* 0 */
@@ -130,7 +130,7 @@ SDL_WAYLAND_SYM(int, xkb_state_key_get_syms, (struct xkb_state *, xkb_keycode_t,
SDL_WAYLAND_SYM(int, xkb_keysym_to_utf8, (xkb_keysym_t, char *, size_t) )
SDL_WAYLAND_SYM(struct xkb_keymap *, xkb_keymap_new_from_string, (struct xkb_context *, const char *, enum xkb_keymap_format, enum xkb_keymap_compile_flags))
SDL_WAYLAND_SYM(struct xkb_state *, xkb_state_new, (struct xkb_keymap *) )
-SDL_WAYLAND_SYM(int, xkb_keymap_key_repeats, (struct xkb_keymap *keymap, xkb_keycode_t key) );
+SDL_WAYLAND_SYM(int, xkb_keymap_key_repeats, (struct xkb_keymap *keymap, xkb_keycode_t key) )
SDL_WAYLAND_SYM(void, xkb_keymap_unref, (struct xkb_keymap *) )
SDL_WAYLAND_SYM(void, xkb_state_unref, (struct xkb_state *) )
SDL_WAYLAND_SYM(void, xkb_context_unref, (struct xkb_context *) )
diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c
index d706303053da..9a5c7b9ea811 100644
--- a/src/video/wayland/SDL_waylandvideo.c
+++ b/src/video/wayland/SDL_waylandvideo.c
@@ -71,7 +71,7 @@ static void Wayland_VideoQuit(_THIS);
/* Find out what class name we should use
* Based on src/video/x11/SDL_x11video.c */
-static char *get_classname()
+static char *get_classname(void)
{
/* !!! FIXME: this is probably wrong, albeit harmless in many common cases. From protocol spec:
"The surface class identifies the general class of applications
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index c84206baf07e..6bad7cdadd48 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -1474,7 +1474,7 @@ int Wayland_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation)
return 0;
}
-void handle_preferred_scale_changed(void *data,
+static void handle_preferred_scale_changed(void *data,
struct wp_fractional_scale_v1 *wp_fractional_scale_v1,
uint preferred_scale)
{
diff --git a/src/video/x11/SDL_x11mouse.c b/src/video/x11/SDL_x11mouse.c
index 3f67950bb369..b8ba1c25592c 100644
--- a/src/video/x11/SDL_x11mouse.c
+++ b/src/video/x11/SDL_x11mouse.c
@@ -36,7 +36,7 @@ static Display *GetDisplay(void)
return SDL_GetVideoDevice()->driverdata->display;
}
-static Cursor X11_CreateEmptyCursor()
+static Cursor X11_CreateEmptyCursor(void)
{
if (x11_empty_cursor == None) {
Display *display = GetDisplay();
@@ -65,7 +65,7 @@ static void X11_DestroyEmptyCursor(void)
}
}
-static SDL_Cursor *X11_CreateDefaultCursor()
+static SDL_Cursor *X11_CreateDefaultCursor(void)
{
SDL_Cursor *cursor;
diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h
index d160eae034af..17734ad59e2c 100644
--- a/src/video/x11/SDL_x11sym.h
+++ b/src/video/x11/SDL_x11sym.h
@@ -278,7 +278,7 @@ SDL_X11_SYM(Bool,XIWarpPointer,(Display *a,int b,Window c,Window d,double e,doub
#if SDL_VIDEO_DRIVER_X11_XRANDR
SDL_X11_MODULE(XRANDR)
SDL_X11_SYM(Status,XRRQueryVersion,(Display *dpy,int *major_versionp,int *minor_versionp),(dpy,major_versionp,minor_versionp),return)
-SDL_X11_SYM(Bool,XRRQueryExtension,(Display *dpy,int *event_base_return,int *error_base_return),(dpy,event_base_return,error_base_return),return);
+SDL_X11_SYM(Bool,XRRQueryExtension,(Display *dpy,int *event_base_return,int *error_base_return),(dpy,event_base_return,error_base_return),return)
SDL_X11_SYM(XRRScreenConfiguration *,XRRGetScreenInfo,(Display *dpy,Drawable draw),(dpy,draw),return)
SDL_X11_SYM(SizeID,XRRConfigCurrentConfiguration,(XRRScreenConfiguration *config,Rotation *rotation),(config,rotation),return)
SDL_X11_SYM(short,XRRConfigCurrentRate,(XRRScreenConfiguration *config),(config),return)
diff --git a/src/video/x11/SDL_x11video.c b/src/video/x11/SDL_x11video.c
index d2517772c61f..e43ad2388d66 100644
--- a/src/video/x11/SDL_x11video.c
+++ b/src/video/x11/SDL_x11video.c
@@ -45,7 +45,7 @@ static int X11_VideoInit(_THIS);
static void X11_VideoQuit(_THIS);
/* Find out what class name we should use */
-static char *get_classname()
+static char *get_classname(void)
{
char *spot;
#if defined(__LINUX__) || defined(__FREEBSD__)
diff --git a/src/video/x11/SDL_x11xfixes.c b/src/video/x11/SDL_x11xfixes.c
index 7e1748aca3f1..bd4d2cdeb29d 100644
--- a/src/video/x11/SDL_x11xfixes.c
+++ b/src/video/x11/SDL_x11xfixes.c
@@ -64,7 +64,7 @@ void X11_InitXfixes(_THIS)
xfixes_initialized = 1;
}
-int X11_XfixesIsInitialized()
+int X11_XfixesIsInitialized(void)
{
return xfixes_initialized;
}
diff --git a/src/video/x11/SDL_x11xinput2.c b/src/video/x11/SDL_x11xinput2.c
index 618eb6fad1fb..4336854e3c45 100644
--- a/src/video/x11/SDL_x11xinput2.c
+++ b/src/video/x11/SDL_x11xinput2.c
@@ -451,7 +451,7 @@ void X11_Xinput2SelectTouch(_THIS, SDL_Window *window)
#endif
}
-int X11_Xinput2IsInitialized()
+int X11_Xinput2IsInitialized(void)
{
#if SDL_VIDEO_DRIVER_X11_XINPUT2
return xinput2_initialized;
@@ -460,7 +460,7 @@ int X11_Xinput2IsInitialized()
#endif
}
-int X11_Xinput2IsMultitouchSupported()
+int X11_Xinput2IsMultitouchSupported(void)
{
#if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
return xinput2_initialized && xinput2_multitouch_supported;