I updated my toolchain for the first time in a few years to the latest versions - now the midi sysex forwarding routine doesn’t compile anymore http://www.ucapps.de/mios_c_forward_chn1.html
This is the error I get:
“main.c:236 warning 94: comparison is always true due to limited range of data type”
In reference to this line:
if( fx_status != 0xff )
/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS when a MIDI byte has been received
/////////////////////////////////////////////////////////////////////////////
void MPROC_NotifyReceivedByte(unsigned char byte) __wparam
{
static char fx_status;
// normal MIDI events are forwarded in MPROC_NotifyReceivedEvnt
// this function handles sysex and realtime messages
if( byte & 0x80 ) { // Status message
if( byte >= 0xf0 )
MIOS_MIDI_TxBufferPut(byte); // transfer byte
// determine status
if( byte == 0xf0 ) {
fx_status = 0xff; // forward until 0xf7
} else if( byte == 0xf7 ) {
fx_status = 0; // f7 reached, no forward
} else if( byte == 0xf1 || byte == 0xf3 ) {
fx_status = 1; // expecting one additional byte
} else if( byte == 0xf2 ) {
fx_status = 2; // expecting two additional bytes
} else {
fx_status = 0; // expecting no additional byte
}
} else {
// check if fx status active
if( fx_status ) {
// forward data byte
MIOS_MIDI_TxBufferPut(byte);
// decrement counter if required
if( fx_status != 0xff )
--fx_status;
}
}
}
I even tried starting from scratch with the simple Clockbox v1c and replace the empty “When a MIDI byte has been received” routine and I still get this error.