From 267fa650a5b2f75835acefc5a38f116bcfb18b8f Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 1 May 2013 15:02:59 -0700 Subject: [PATCH] cmMidiPort.c: Use 0xff as invalid status byte instead of -1 in cmMpParseMidiData() and cmMpParserMidiTriple() to eliminate 'always true' warning. --- cmMidiPort.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmMidiPort.c b/cmMidiPort.c index 55634fd..51281a1 100644 --- a/cmMidiPort.c +++ b/cmMidiPort.c @@ -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;