From 26e780bc9e5e970983355ee1b108985aa7f84b74 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 16 May 2023 17:52:03 -0700
Subject: [PATCH] Fixed warning "A function declaration without a prototype is
deprecated in all versions of C"
---
src/hidapi/SDL_hidapi.c | 6 +++---
src/hidapi/mac/hid.c | 2 +-
src/video/cocoa/SDL_cocoamouse.m | 2 +-
src/video/cocoa/SDL_cocoawindow.m | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/hidapi/SDL_hidapi.c b/src/hidapi/SDL_hidapi.c
index 925f5fcd900e..b076e2810037 100644
--- a/src/hidapi/SDL_hidapi.c
+++ b/src/hidapi/SDL_hidapi.c
@@ -219,7 +219,7 @@ StrIsInteger(const char *string)
#endif /* HAVE_INOTIFY */
static void
-HIDAPI_InitializeDiscovery()
+HIDAPI_InitializeDiscovery(void)
{
SDL_HIDAPI_discovery.m_bInitialized = SDL_TRUE;
SDL_HIDAPI_discovery.m_unDeviceChangeCounter = 1;
@@ -359,7 +359,7 @@ HIDAPI_InitializeDiscovery()
}
static void
-HIDAPI_UpdateDiscovery()
+HIDAPI_UpdateDiscovery(void)
{
if (!SDL_HIDAPI_discovery.m_bInitialized) {
HIDAPI_InitializeDiscovery();
@@ -477,7 +477,7 @@ HIDAPI_UpdateDiscovery()
}
static void
-HIDAPI_ShutdownDiscovery()
+HIDAPI_ShutdownDiscovery(void)
{
if (!SDL_HIDAPI_discovery.m_bInitialized) {
return;
diff --git a/src/hidapi/mac/hid.c b/src/hidapi/mac/hid.c
index d90f6260c6fa..90049600ae52 100644
--- a/src/hidapi/mac/hid.c
+++ b/src/hidapi/mac/hid.c
@@ -503,7 +503,7 @@ int HID_API_EXPORT hid_exit(void)
return 0;
}
-static void process_pending_events() {
+static void process_pending_events(void) {
SInt32 res;
do {
res = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.001, FALSE);
diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m
index 03be6cbeed19..2dd4c1912291 100644
--- a/src/video/cocoa/SDL_cocoamouse.m
+++ b/src/video/cocoa/SDL_cocoamouse.m
@@ -63,7 +63,7 @@ + (NSCursor *)invisibleCursor
}
@end
-static SDL_Cursor *Cocoa_CreateDefaultCursor()
+static SDL_Cursor *Cocoa_CreateDefaultCursor(void)
{
@autoreleasepool {
NSCursor *nscursor;
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index e57837ee02ff..4b04afd9a86e 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -320,7 +320,7 @@ static void ScheduleContextUpdates(SDL_CocoaWindowData *data)
}
/* !!! FIXME: this should use a hint callback. */
-static int GetHintCtrlClickEmulateRightClick()
+static int GetHintCtrlClickEmulateRightClick(void)
{
return SDL_GetHintBoolean(SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK, SDL_FALSE);
}