Skip to content

Commit

Permalink
Merge pull request #7 from CeRiAl/dev
Browse files Browse the repository at this point in the history
Get rid of some more compiler warnings
  • Loading branch information
CeRiAl authored Jun 25, 2020
2 parents 487227a + c599dde commit ac6798f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: C/C++ CI

on:
push:
branches: [ master, sdl2 ]
branches: [ master, dev, sdl2 ]
pull_request:
branches: [ master, sdl2 ]

Expand Down
32 changes: 16 additions & 16 deletions src/sound/xmidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ uint32 XMidi::convertListToMTrk (unsigned char *buf, const midi_event *mlist)
unsigned char last_status = 0;
uint32 i = 8;
uint32 j;
int i_start;
// int i_start; // Unused

/* This is set true to make the song end when an XMidiFile break is hit. */
int sshock_break = 0;
Expand All @@ -528,7 +528,7 @@ uint32 XMidi::convertListToMTrk (unsigned char *buf, const midi_event *mlist)

for (const midi_event* event = mlist; event; event=event->next)
{
i_start = i;
// i_start = i; // Unused

/* If sshock_break is set, the delta is only 0 */
delta = sshock_break?0:event->time - time;
Expand Down Expand Up @@ -717,23 +717,23 @@ bool XMidi::handleChunkXMID(XMidiFile* xmidi, const unsigned char* stream, uint3
uint32 read_so_far = 0;

do {
bool result;
bool result;

getIFFchunkHeader(chunk, stream);
stream += 8;
read_so_far += 8;
getIFFchunkHeader(chunk, stream);
stream += 8;
read_so_far += 8;

if (chunk.isType("FORM")) {
result = handleChunkFORM(xmidi, stream, chunk.size);
} else
if (chunk.isType("TIMB")) {
result = handleChunkTIMB(xmidi, stream, chunk.size);
if (chunk.isType("FORM")) {
result = handleChunkFORM(xmidi, stream, chunk.size);
} else
if (chunk.isType("EVNT")) {
result = handleChunkEVNT(xmidi, stream, chunk.size);
} else {
return false; // We don't know how to handle this
}
if (chunk.isType("TIMB")) {
result = handleChunkTIMB(xmidi, stream, chunk.size);
} else
if (chunk.isType("EVNT")) {
result = handleChunkEVNT(xmidi, stream, chunk.size);
} else {
return false; // We don't know how to handle this
}
if (!result) {
return 0; // something failed
}
Expand Down

0 comments on commit ac6798f

Please sign in to comment.