removed unused function parameters
authorHolger Schemel <info@artsoft.org>
Sat, 22 Oct 2022 10:09:19 +0000 (12:09 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 22 Oct 2022 10:09:19 +0000 (12:09 +0200)
This issue was found by using GCC with option "-Wextra".

src/init.c
src/libgame/sound.c
src/libgame/sound.h

index b2a6367623180705e8a5067c829d005f0b5f9e6d..547d629e6f4f8f9c416147cdb88201d29649fdac 100644 (file)
@@ -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();
index 35c0a2465457b8f34e33423aa3a91213c7e0de3d..21c21fddeebb8e0aba8fa20366e16e20251e9611 100644 (file)
@@ -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;
index 190c441e735e24fc002b2e957d79d239c7a31ee9..1cdf72dc3109aa6c5cd7a810ee3e4197133bb062 100644 (file)
@@ -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);