cmMidiPort.c: Use 0xff as invalid status byte instead of -1 in cmMpParseMidiData()

and cmMpParserMidiTriple() to eliminate 'always true' warning.
This commit is contained in:
kevin 2013-05-01 15:02:59 -07:00
parent 92c7f0aa9b
commit 267fa650a5

View File

@ -352,7 +352,7 @@ cmMpRC_t cmMpParserMidiTriple( cmMpParserH_t h, unsigned deltaMicroSecs, cmMi
{
cmMpRC_t rc = kOkMpRC;
cmMpParser_t* p = _cmMpParserFromHandle(h);
cmMidiByte_t mb = -1;
cmMidiByte_t mb = 0xff; // a midi triple may never have a status of 0xff
if( d0 == 0xff )
p->dataCnt = 0;
@ -384,7 +384,7 @@ cmMpRC_t cmMpParserMidiTriple( cmMpParserH_t h, unsigned deltaMicroSecs, cmMi
break;
}
if( mb != -1 )
if( mb != 0xff )
_cmMpParserStoreChMsg(p,deltaMicroSecs,mb);
p->dataCnt = cmInvalidCnt;