From: Holger Schemel Date: Sat, 22 Oct 2022 10:09:19 +0000 (+0200) Subject: removed unused function parameters X-Git-Tag: 4.3.3.0~36 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=afad49f6ce2e58eeb41f680b8d05eed74455a1ab;p=rocksndiamonds.git removed unused function parameters This issue was found by using GCC with option "-Wextra". --- diff --git a/src/init.c b/src/init.c index b2a63676..547d629e 100644 --- a/src/init.c +++ b/src/init.c @@ -5979,17 +5979,14 @@ static void InitImages(void) print_timestamp_done("InitImages"); } -static void InitSound(char *identifier) +static void InitSound(void) { print_timestamp_init("InitSound"); - if (identifier == NULL) - identifier = artwork.snd_current->identifier; - // set artwork path to send it to the sound server process setLevelArtworkDir(artwork.snd_first); - InitReloadCustomSounds(identifier); + InitReloadCustomSounds(); print_timestamp_time("InitReloadCustomSounds"); ReinitializeSounds(); @@ -5998,17 +5995,14 @@ static void InitSound(char *identifier) print_timestamp_done("InitSound"); } -static void InitMusic(char *identifier) +static void InitMusic(void) { print_timestamp_init("InitMusic"); - if (identifier == NULL) - identifier = artwork.mus_current->identifier; - // set artwork path to send it to the sound server process setLevelArtworkDir(artwork.mus_first); - InitReloadCustomMusic(identifier); + InitReloadCustomMusic(); print_timestamp_time("InitReloadCustomMusic"); ReinitializeMusic(); @@ -6342,13 +6336,13 @@ void ReloadCustomArtwork(int force_reload) if (snd_new_identifier != NULL || force_reload_snd) { - InitSound(snd_new_identifier); + InitSound(); print_timestamp_time("InitSound"); } if (mus_new_identifier != NULL || force_reload_mus) { - InitMusic(mus_new_identifier); + InitMusic(); print_timestamp_time("InitMusic"); } @@ -6536,10 +6530,10 @@ void OpenAll(void) InitImages(); // needs to know current level directory print_timestamp_time("InitImages"); - InitSound(NULL); // needs to know current level directory + InitSound(); // needs to know current level directory print_timestamp_time("InitSound"); - InitMusic(NULL); // needs to know current level directory + InitMusic(); // needs to know current level directory print_timestamp_time("InitMusic"); InitArtworkDone(); diff --git a/src/libgame/sound.c b/src/libgame/sound.c index 35c0a246..21c21fdd 100644 --- a/src/libgame/sound.c +++ b/src/libgame/sound.c @@ -1103,7 +1103,7 @@ static void ReloadCustomMusic(void) LoadCustomMusic_NoConf(); } -void InitReloadCustomSounds(char *set_identifier) +void InitReloadCustomSounds(void) { if (!audio.sound_available) return; @@ -1111,7 +1111,7 @@ void InitReloadCustomSounds(char *set_identifier) ReloadCustomSounds(); } -void InitReloadCustomMusic(char *set_identifier) +void InitReloadCustomMusic(void) { if (!audio.music_available) return; diff --git a/src/libgame/sound.h b/src/libgame/sound.h index 190c441e..1cdf72dc 100644 --- a/src/libgame/sound.h +++ b/src/libgame/sound.h @@ -134,8 +134,8 @@ void InitSoundList(struct ConfigInfo *, int, struct ConfigTypeInfo *, char **, char **, char **, char **, char **); void InitMusicList(struct ConfigInfo *, int, struct ConfigTypeInfo *, char **, char **, char **, char **, char **); -void InitReloadCustomSounds(char *); -void InitReloadCustomMusic(char *); +void InitReloadCustomSounds(void); +void InitReloadCustomMusic(void); void FreeAllSounds(void); void FreeAllMusic(void);