Browse Source

Fixed warning "A function declaration without a prototype is deprecated in all versions of C"

Sam Lantinga 1 year ago
parent
commit
26e780bc9e

+ 3 - 3
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;

+ 1 - 1
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);

+ 1 - 1
src/video/cocoa/SDL_cocoamouse.m

@@ -63,7 +63,7 @@
 }
 @end
 
-static SDL_Cursor *Cocoa_CreateDefaultCursor()
+static SDL_Cursor *Cocoa_CreateDefaultCursor(void)
 {
     @autoreleasepool {
         NSCursor *nscursor;

+ 1 - 1
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);
 }