Pārlūkot izejas kodu

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

Sam Lantinga 1 dienu atpakaļ
vecāks
revīzija
e0a935d910

+ 3 - 3
src/notification/SDL_notification_c.h

@@ -25,14 +25,14 @@
 #include <SDL3/SDL_notification.h>
 
 extern SDL_NotificationID SDL_SYS_ShowNotification(SDL_PropertiesID props);
-extern void SDL_CleanupNotifications();
+extern void SDL_CleanupNotifications(void);
 
 #ifdef SDL_PLATFORM_APPLE
-extern void Cocoa_RegisterNotificationDelegate();
+extern void Cocoa_RegisterNotificationDelegate(void);
 #endif
 
 #ifdef SDL_VIDEO_DRIVER_WAYLAND
-extern const char *SDL_GetNotificationActivationToken();
+extern const char *SDL_GetNotificationActivationToken(void);
 #endif
 
 #endif // SDL_NOTIFICATION_C_H

+ 1 - 1
src/notification/cocoa/SDL_cocoanotification.m

@@ -127,7 +127,7 @@ static NSURL *SaveTempImage(SDL_Surface *image)
     }
 }
 
-void Cocoa_RegisterNotificationDelegate()
+void Cocoa_RegisterNotificationDelegate(void)
 {
     if (!ShouldEnableNotifications()) {
         return;

+ 4 - 4
src/notification/dummy/SDL_dummynotification.c

@@ -38,21 +38,21 @@ bool SDL_RemoveNotification(SDL_NotificationID notification)
     return SDL_Unsupported();
 }
 
-void SDL_CleanupNotifications()
+void SDL_CleanupNotifications(void)
 {
     // Nothing to do.
 }
 
 #ifdef SDL_PLATFORM_APPLE
-void Cocoa_RegisterNotificationDelegate()
+void Cocoa_RegisterNotificationDelegate(void)
 {
     // Nothing to do.
 }
 #endif
 
 #ifdef SDL_VIDEO_DRIVER_WAYLAND
-const char *SDL_GetNotificationActivationToken()
+const char *SDL_GetNotificationActivationToken(void)
 {
     return NULL;
 }
-#endif
+#endif

+ 2 - 2
src/notification/unix/SDL_dbusnotification.c

@@ -1520,7 +1520,7 @@ bool SDL_RemoveNotification(SDL_NotificationID notification)
     return false;
 }
 
-void SDL_CleanupNotifications()
+void SDL_CleanupNotifications(void)
 {
     SDL_DBusContext *dbus = SDL_DBus_GetContext();
 
@@ -1571,7 +1571,7 @@ bool SDL_RequestNotificationPermission(void)
 }
 
 #ifdef SDL_VIDEO_DRIVER_WAYLAND
-const char *SDL_GetNotificationActivationToken()
+const char *SDL_GetNotificationActivationToken(void)
 {
     // Track the lifetime to avoid returning a stale token.
     if (activation_token && SDL_GetTicksNS() - activation_token_time_ns < ACTIVATION_TOKEN_LIFETIME) {

+ 1 - 1
src/notification/windows/SDL_windowsnotification.c

@@ -1109,7 +1109,7 @@ bool SDL_RemoveNotification(SDL_NotificationID notification)
     return true;
 }
 
-void SDL_CleanupNotifications()
+void SDL_CleanupNotifications(void)
 {
     if (pNotificationFactory) {
         pNotificationFactory->lpVtbl->Release(pNotificationFactory);