shithub: choc

Download patch

ref: 54fd5795e6139328fdc1e2459f9134423b10f421
parent: ed96b0d9a3161421ca4c319e761be8c1afc7bbb8
author: Roman Fomin <rfomin@gmail.com>
date: Fri Nov 12 20:15:36 EST 2021

fix gcc warning

--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -185,7 +185,6 @@
 // Initialize music subsystem
 static boolean I_SDL_InitMusic(void)
 {
-    boolean fluidsynth_sf_is_set = false;
     // If SDL_mixer is not initialized, we have to initialize it
     // and have the responsibility to shut it down later on.
 
@@ -227,15 +226,7 @@
 
     if (strlen(fluidsynth_sf_path) > 0 && strlen(timidity_cfg_path) == 0)
     {
-        if (!M_FileExists(fluidsynth_sf_path))
-        {
-            fprintf(stderr, "Can't find Fluidsynth soundfont.\n");
-        }
-        else
-        {
-            Mix_SetSoundFonts(fluidsynth_sf_path);
-            fluidsynth_sf_is_set = true;
-        }
+        Mix_SetSoundFonts(fluidsynth_sf_path);
     }
 
     // If snd_musiccmd is set, we need to call Mix_SetMusicCMD to
@@ -249,7 +240,7 @@
 #if defined(_WIN32)
     // Don't enable it for GUS or Fluidsynth, since they handle their own volume
     // just fine.
-    if (snd_musicdevice != SNDDEVICE_GUS && !fluidsynth_sf_is_set)
+    if (snd_musicdevice != SNDDEVICE_GUS && strlen(fluidsynth_sf_path) == 0)
     {
         win_midi_stream_opened = I_WIN_InitMusic();
     }