mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-07-09 02:39:42 +00:00
Fix -Wstrict-prototypes warnings
e.g. SDL3/src/hidapi/libusb/hid.c:636:31: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 636 | static void start_event_thread()
This commit is contained in:
@@ -633,7 +633,7 @@ static void *event_thread(void *param)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void start_event_thread()
|
||||
static void start_event_thread(void)
|
||||
{
|
||||
if (libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)) {
|
||||
int res = libusb_hotplug_register_callback(usb_context, LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED | LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT, 0, LIBUSB_HOTPLUG_MATCH_ANY, LIBUSB_HOTPLUG_MATCH_ANY, LIBUSB_HOTPLUG_MATCH_ANY, hotplug_callback, NULL, &hotplug_callback_handle);
|
||||
@@ -645,7 +645,7 @@ static void start_event_thread()
|
||||
hidapi_thread_create(&event_thread_state, event_thread, NULL);
|
||||
}
|
||||
|
||||
static void stop_event_thread()
|
||||
static void stop_event_thread(void)
|
||||
{
|
||||
shutdown_event_thread = 1;
|
||||
libusb_interrupt_event_handler(usb_context);
|
||||
|
||||
@@ -88,7 +88,7 @@ API_AVAILABLE(macos(10.14))
|
||||
static UNUserNotificationCenter *center;
|
||||
static SDLNotificationDelegate *delegate;
|
||||
|
||||
static bool ShouldEnableNotifications()
|
||||
static bool ShouldEnableNotifications(void)
|
||||
{
|
||||
#if defined(SDL_PLATFORM_MACOS)
|
||||
/* Notifications outside of an app bundle are unsupported, and will crash with an
|
||||
@@ -354,7 +354,7 @@ bool SDL_RemoveNotification(SDL_NotificationID notification)
|
||||
}
|
||||
#endif
|
||||
|
||||
void SDL_CleanupNotifications()
|
||||
void SDL_CleanupNotifications(void)
|
||||
{
|
||||
// TODO: Anything to do here?
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "SDL_cocoavideo.h"
|
||||
|
||||
extern bool Cocoa_InitMouse(SDL_VideoDevice *_this);
|
||||
extern NSWindow *Cocoa_GetMouseFocus();
|
||||
extern NSWindow *Cocoa_GetMouseFocus(void);
|
||||
extern void Cocoa_HandleMouseEvent(SDL_VideoDevice *_this, NSEvent *event);
|
||||
extern void Cocoa_HandleMouseWheel(SDL_Window *window, NSEvent *event);
|
||||
extern void Cocoa_HandleMouseWarp(CGFloat x, CGFloat y);
|
||||
|
||||
@@ -768,7 +768,7 @@ static void Cocoa_HandleTitleButtonEvent(SDL_VideoDevice *_this, NSEvent *event)
|
||||
|
||||
static NSWindow *Cocoa_MouseFocus;
|
||||
|
||||
NSWindow *Cocoa_GetMouseFocus()
|
||||
NSWindow *Cocoa_GetMouseFocus(void)
|
||||
{
|
||||
return Cocoa_MouseFocus;
|
||||
}
|
||||
|
||||
@@ -2241,7 +2241,7 @@ static void Cocoa_SendMouseButtonClicks(SDL_Mouse *mouse, NSEvent *theEvent, SDL
|
||||
}
|
||||
@end
|
||||
|
||||
static void Cocoa_UpdateMouseFocus()
|
||||
static void Cocoa_UpdateMouseFocus(void)
|
||||
{
|
||||
const NSPoint mouseLocation = [NSEvent mouseLocation];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user