timidity: minor warning fixes
authorOzkan Sezer
Mon, 16 Dec 2019 10:33:55 +0300
changeset 10837a3b49dbf90f
parent 1078 092f7e1f97b9
child 1084 c7cedfb5f65f
timidity: minor warning fixes

based on a patch by Wohlstand
src/codecs/timidity/instrum.c
src/codecs/timidity/playmidi.c
src/codecs/timidity/readmidi.c
     1.1 --- a/src/codecs/timidity/instrum.c	Thu Dec 12 17:28:10 2019 +0300
     1.2 +++ b/src/codecs/timidity/instrum.c	Mon Dec 16 10:33:55 2019 +0300
     1.3 @@ -160,6 +160,7 @@
     1.4    char tmp[1024];
     1.5    int i,j,noluck=0;
     1.6    static char *patch_ext[] = PATCH_EXT_LIST;
     1.7 +  (void)percussion; /* unused */
     1.8  
     1.9    if (!name) return 0;
    1.10    
     2.1 --- a/src/codecs/timidity/playmidi.c	Thu Dec 12 17:28:10 2019 +0300
     2.2 +++ b/src/codecs/timidity/playmidi.c	Mon Dec 16 10:33:55 2019 +0300
     2.3 @@ -65,7 +65,7 @@
     2.4    reset_voices(song);
     2.5  }
     2.6  
     2.7 -static void select_sample(MidiSong *song, int v, Instrument *ip, int vel)
     2.8 +static void select_sample(MidiSong *song, int v, Instrument *ip)
     2.9  {
    2.10    Sint32 f, cdiff, diff;
    2.11    int s,i;
    2.12 @@ -268,7 +268,7 @@
    2.13  	song->voice[i].orig_frequency = freq_table[(int)(ip->sample->note_to_use)];
    2.14        else
    2.15  	song->voice[i].orig_frequency = freq_table[e->a & 0x7F];
    2.16 -      select_sample(song, i, ip, e->b);
    2.17 +      select_sample(song, i, ip);
    2.18      }
    2.19  
    2.20    song->voice[i].status = VOICE_ON;
     3.1 --- a/src/codecs/timidity/readmidi.c	Thu Dec 12 17:28:10 2019 +0300
     3.2 +++ b/src/codecs/timidity/readmidi.c	Mon Dec 16 10:33:55 2019 +0300
     3.3 @@ -537,7 +537,7 @@
     3.4  	return NULL;
     3.5        }
     3.6    }
     3.7 -  len=SDL_SwapBE32(len);
     3.8 +  len=(Sint32)SDL_SwapBE32((Uint32)len);
     3.9    if (memcmp(tmp, "MThd", 4) || len < 6)
    3.10      {
    3.11        SNDDBG(("Not a MIDI file!\n"));