From 4f183506f6ecbe1e9cdbc05768fe4d4846580102 Mon Sep 17 00:00:00 2001 From: RaceTheMaSe Date: Sat, 7 Feb 2026 16:38:59 +0100 Subject: [PATCH] Fix warning: strict prototypes (#14992) clang: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] --- src/core/unix/SDL_gtk.c | 2 +- src/tray/windows/SDL_tray.c | 2 +- src/video/openvr/SDL_openvrvideo.c | 10 +++++----- src/video/windows/SDL_windowsclipboard.c | 2 +- src/video/windows/SDL_windowskeyboard.c | 2 +- src/video/x11/SDL_x11xinput2.c | 2 +- test/testpalette.c | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/core/unix/SDL_gtk.c b/src/core/unix/SDL_gtk.c index 6cf26fd47a..92e8a16ff9 100644 --- a/src/core/unix/SDL_gtk.c +++ b/src/core/unix/SDL_gtk.c @@ -78,7 +78,7 @@ static void QuitGtk(void) libgtk = NULL; } -static bool IsGtkInit() +static bool IsGtkInit(void) { return libgdk != NULL && libgtk != NULL; } diff --git a/src/tray/windows/SDL_tray.c b/src/tray/windows/SDL_tray.c index f3c6d90c85..fd46b6e3fb 100644 --- a/src/tray/windows/SDL_tray.c +++ b/src/tray/windows/SDL_tray.c @@ -226,7 +226,7 @@ static wchar_t *escape_label(const char *in) return out; } -static HICON load_default_icon() +static HICON load_default_icon(void) { HINSTANCE hInstance = GetModuleHandle(NULL); if (!hInstance) { diff --git a/src/video/openvr/SDL_openvrvideo.c b/src/video/openvr/SDL_openvrvideo.c index 5e7061be3e..8a9d36c7cc 100644 --- a/src/video/openvr/SDL_openvrvideo.c +++ b/src/video/openvr/SDL_openvrvideo.c @@ -74,7 +74,7 @@ SDL_ELF_NOTE_DLOPEN( // For access to functions that don't get the video data context. SDL_VideoData * global_openvr_driver; -static void InitializeMouseFunctions(); +static void InitializeMouseFunctions(void); struct SDL_CursorData { @@ -92,9 +92,9 @@ static void (APIENTRY *ov_glRenderbufferStorage)(GLenum target, GLenum internalf static void (APIENTRY *ov_glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); static void (APIENTRY *ov_glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); static GLenum (APIENTRY *ov_glCheckNamedFramebufferStatus)(GLuint framebuffer, GLenum target); -static GLenum (APIENTRY *ov_glGetError)(); -static void (APIENTRY *ov_glFlush)(); -static void (APIENTRY *ov_glFinish)(); +static GLenum (APIENTRY *ov_glGetError)(void); +static void (APIENTRY *ov_glFlush)(void); +static void (APIENTRY *ov_glFinish)(void); static void (APIENTRY *ov_glGenTextures)(GLsizei n, GLuint *textures); static void (APIENTRY *ov_glDeleteTextures)(GLsizei n, GLuint *textures); static void (APIENTRY *ov_glTexParameterf)(GLenum target, GLenum pname, GLfloat param); @@ -1431,7 +1431,7 @@ static bool OPENVR_ShowMessageBox(SDL_VideoDevice *_this,const SDL_MessageBoxDat return true; } -static void InitializeMouseFunctions() +static void InitializeMouseFunctions(void) { SDL_Mouse *mouse = SDL_GetMouse(); mouse->CreateCursor = OPENVR_CreateCursor; diff --git a/src/video/windows/SDL_windowsclipboard.c b/src/video/windows/SDL_windowsclipboard.c index 219a5d7b06..b3fa551db0 100644 --- a/src/video/windows/SDL_windowsclipboard.c +++ b/src/video/windows/SDL_windowsclipboard.c @@ -33,7 +33,7 @@ // Assume we can directly read and write BMP fields without byte swapping SDL_COMPILE_TIME_ASSERT(verify_byte_order, SDL_BYTEORDER == SDL_LIL_ENDIAN); -static UINT GetClipboardFormatPNG() +static UINT GetClipboardFormatPNG(void) { static UINT format; diff --git a/src/video/windows/SDL_windowskeyboard.c b/src/video/windows/SDL_windowskeyboard.c index 698ae5d75a..9129c7dd9e 100644 --- a/src/video/windows/SDL_windowskeyboard.c +++ b/src/video/windows/SDL_windowskeyboard.c @@ -101,7 +101,7 @@ static void WIN_CacheKeymap(HKL layout, SDL_Keymap *keymap) ++keymap_cache_size; } -static SDL_Keymap *WIN_BuildKeymap() +static SDL_Keymap *WIN_BuildKeymap(void) { SDL_Scancode scancode; BYTE keyboardState[256] = { 0 }; diff --git a/src/video/x11/SDL_x11xinput2.c b/src/video/x11/SDL_x11xinput2.c index 30deb118a8..c8b37cec98 100644 --- a/src/video/x11/SDL_x11xinput2.c +++ b/src/video/x11/SDL_x11xinput2.c @@ -139,7 +139,7 @@ static SDL_Window *xinput2_get_sdlwindow(SDL_VideoData *videodata, Window window } #ifdef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_SCROLLINFO -static void xinput2_reset_scrollable_valuators() +static void xinput2_reset_scrollable_valuators(void) { for (int i = 0; i < scrollable_device_count; ++i) { for (int j = 0; j < scrollable_devices[i].scroll_info_count; ++j) { diff --git a/test/testpalette.c b/test/testpalette.c index 6355d59230..acaead57c2 100644 --- a/test/testpalette.c +++ b/test/testpalette.c @@ -304,7 +304,7 @@ static SDL_Texture *CreateTexture(const void *pixels, int pitch) return tex; } -static bool CreateTextures() +static bool CreateTextures(void) { Uint8 data[256]; int i;