From fc0fe9335b75c1a127586ec89eb234db8d66b3d4 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Mon, 16 Dec 2019 10:33:55 +0300 Subject: [PATCH] timidity: minor warning fixes based on a patch by Wohlstand --- src/codecs/timidity/instrum.c | 1 + src/codecs/timidity/playmidi.c | 4 ++-- src/codecs/timidity/readmidi.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/codecs/timidity/instrum.c b/src/codecs/timidity/instrum.c index dedbea0b..6cc9ff73 100644 --- a/src/codecs/timidity/instrum.c +++ b/src/codecs/timidity/instrum.c @@ -160,6 +160,7 @@ static Instrument *load_instrument(MidiSong *song, char *name, int percussion, char tmp[1024]; int i,j,noluck=0; static char *patch_ext[] = PATCH_EXT_LIST; + (void)percussion; /* unused */ if (!name) return 0; diff --git a/src/codecs/timidity/playmidi.c b/src/codecs/timidity/playmidi.c index 674dccdd..9e1f06e8 100644 --- a/src/codecs/timidity/playmidi.c +++ b/src/codecs/timidity/playmidi.c @@ -65,7 +65,7 @@ static void reset_midi(MidiSong *song) reset_voices(song); } -static void select_sample(MidiSong *song, int v, Instrument *ip, int vel) +static void select_sample(MidiSong *song, int v, Instrument *ip) { Sint32 f, cdiff, diff; int s,i; @@ -268,7 +268,7 @@ static void start_note(MidiSong *song, MidiEvent *e, int i) song->voice[i].orig_frequency = freq_table[(int)(ip->sample->note_to_use)]; else song->voice[i].orig_frequency = freq_table[e->a & 0x7F]; - select_sample(song, i, ip, e->b); + select_sample(song, i, ip); } song->voice[i].status = VOICE_ON; diff --git a/src/codecs/timidity/readmidi.c b/src/codecs/timidity/readmidi.c index f416a063..8c9c8f58 100644 --- a/src/codecs/timidity/readmidi.c +++ b/src/codecs/timidity/readmidi.c @@ -537,7 +537,7 @@ MidiEvent *read_midi_file(MidiSong *song, Sint32 *count, Sint32 *sp) return NULL; } } - len=SDL_SwapBE32(len); + len=(Sint32)SDL_SwapBE32((Uint32)len); if (memcmp(tmp, "MThd", 4) || len < 6) { SNDDBG(("Not a MIDI file!\n"));