From 2c2c2c5a4878dabe3aa350b5aa184c2c55b79e9a Mon Sep 17 00:00:00 2001 From: Petar Popovic Date: Sat, 26 Jul 2025 19:03:54 +0200 Subject: [PATCH] Fixed a few "-Wstrict-prototypes" warnings --- src/audio/alsa/SDL_alsa_audio.c | 8 ++++---- src/core/linux/SDL_progressbar.c | 4 ++-- test/gamepadutils.h | 2 +- test/testcontroller.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c index f93433e641..a0fb617ccd 100644 --- a/src/audio/alsa/SDL_alsa_audio.c +++ b/src/audio/alsa/SDL_alsa_audio.c @@ -1470,7 +1470,7 @@ static void ALSA_udev_callback(SDL_UDEV_deviceevent udev_type, int udev_class, c } } -static bool ALSA_start_udev() +static bool ALSA_start_udev(void) { udev_initialized = SDL_UDEV_Init(); if (udev_initialized) { @@ -1483,7 +1483,7 @@ static bool ALSA_start_udev() return udev_initialized; } -static void ALSA_stop_udev() +static void ALSA_stop_udev(void) { if (udev_initialized) { SDL_UDEV_DelCallback(ALSA_udev_callback); @@ -1494,12 +1494,12 @@ static void ALSA_stop_udev() #else -static bool ALSA_start_udev() +static bool ALSA_start_udev(void) { return false; } -static void ALSA_stop_udev() +static void ALSA_stop_udev(void) { } diff --git a/src/core/linux/SDL_progressbar.c b/src/core/linux/SDL_progressbar.c index e50f8361ca..ac0789b2d2 100644 --- a/src/core/linux/SDL_progressbar.c +++ b/src/core/linux/SDL_progressbar.c @@ -32,7 +32,7 @@ #define UnityLauncherAPI_DBUS_INTERFACE "com.canonical.Unity.LauncherEntry" #define UnityLauncherAPI_DBUS_SIGNAL "Update" -static char *GetDBUSObjectPath() +static char *GetDBUSObjectPath(void) { char *app_id = SDL_strdup(SDL_GetAppID()); @@ -62,7 +62,7 @@ static char *GetDBUSObjectPath() return SDL_strdup(path); } -static char *GetAppDesktopPath() +static char *GetAppDesktopPath(void) { const char *desktop_suffix = ".desktop"; const char *app_id = SDL_GetAppID(); diff --git a/test/gamepadutils.h b/test/gamepadutils.h index 19eeefcff5..5e1dcd3093 100644 --- a/test/gamepadutils.h +++ b/test/gamepadutils.h @@ -161,7 +161,7 @@ typedef enum typedef struct Quaternion Quaternion; typedef struct GyroDisplay GyroDisplay; -extern void InitCirclePoints3D(); +extern void InitCirclePoints3D(void); extern GyroDisplay *CreateGyroDisplay(SDL_Renderer *renderer); extern void SetGyroDisplayArea(GyroDisplay *ctx, const SDL_FRect *area); extern void SetGamepadDisplayIMUValues(GyroDisplay *ctx, float *gyro_drift_solution, float *euler_displacement_angles, Quaternion *gyro_quaternion, int reported_senor_rate_hz, int estimated_sensor_rate_hz, EGyroCalibrationPhase calibration_phase, float drift_calibration_progress_frac, float accelerometer_noise_sq, float accelerometer_noise_tolerance_sq); diff --git a/test/testcontroller.c b/test/testcontroller.c index 6b0fdea27f..a56661af5d 100644 --- a/test/testcontroller.c +++ b/test/testcontroller.c @@ -1439,7 +1439,7 @@ static void HandleGamepadGyroEvent(SDL_Event *event) #define SDL_GAMEPAD_IMU_MIN_POLLING_RATE_ESTIMATION_TIME_NS (SDL_NS_PER_SECOND * 2) -static void EstimatePacketRate() +static void EstimatePacketRate(void) { Uint64 now_ns = SDL_GetTicksNS(); if (controller->imu_state->imu_packet_counter == 0) {