Skip to content

Commit

Permalink
timidity: minor warning fixes
Browse files Browse the repository at this point in the history
based on a patch by Wohlstand
  • Loading branch information
sezero committed Dec 16, 2019
1 parent 766fc39 commit fc0fe93
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/codecs/timidity/instrum.c
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/codecs/timidity/playmidi.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/codecs/timidity/readmidi.c
Expand Up @@ -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"));
Expand Down

0 comments on commit fc0fe93

Please sign in to comment.