From ca41cee016eb4476f150da4e0d639526b7826562 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Mon, 16 Dec 2019 10:55:02 +0300 Subject: [PATCH] add more missing casts to SDL_Swap?E32 calls --- src/codecs/timidity/instrum.c | 2 +- src/codecs/timidity/readmidi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/codecs/timidity/instrum.c b/src/codecs/timidity/instrum.c index 6cc9ff73..29e5809e 100644 --- a/src/codecs/timidity/instrum.c +++ b/src/codecs/timidity/instrum.c @@ -239,7 +239,7 @@ static Instrument *load_instrument(MidiSong *song, char *name, int percussion, thing = SDL_SwapLE16(tmpshort); #define READ_LONG(thing) \ if (1 != SDL_RWread(rw, &tmplong, 4, 1)) goto fail; \ - thing = SDL_SwapLE32(tmplong); + thing = (Sint32)SDL_SwapLE32((Uint32)tmplong); SDL_RWseek(rw, 7, RW_SEEK_CUR); /* Skip the wave name */ diff --git a/src/codecs/timidity/readmidi.c b/src/codecs/timidity/readmidi.c index 8c9c8f58..42055183 100644 --- a/src/codecs/timidity/readmidi.c +++ b/src/codecs/timidity/readmidi.c @@ -293,7 +293,7 @@ static int read_track(MidiSong *song, int append) SNDDBG(("Can't read track header.\n")); return -1; } - len=SDL_SwapBE32(len); + len=(Sint32)SDL_SwapBE32((Uint32)len); next_pos = SDL_RWtell(song->rw) + len; if (memcmp(tmp, "MTrk", 4)) {