Skip to content

Commit

Permalink
MT32: Fix warning
Browse files Browse the repository at this point in the history
The workaround for the unused parameter warning caused a warning:
parameter 'patchNum' set but not used
  • Loading branch information
wjp committed Feb 9, 2012
1 parent 4b2938c commit 0864ede
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions audio/softsynth/mt32/Part.cpp
Expand Up @@ -220,13 +220,13 @@ unsigned int Part::getAbsTimbreNum() const {
return (patchTemp->patch.timbreGroup * 64) + patchTemp->patch.timbreNum;
}

void RhythmPart::setProgram(unsigned int patchNum) {
#if MT32EMU_MONITOR_MIDI > 0
void RhythmPart::setProgram(unsigned int patchNum) {
synth->printDebug("%s: Attempt to set program (%d) on rhythm is invalid", name, patchNum);
}
#else
patchNum = 0; // Just to avoid unused variable warning
void RhythmPart::setProgram(unsigned int) { }
#endif
}

void Part::setProgram(unsigned int patchNum) {
setPatch(&synth->mt32ram.patches[patchNum]);
Expand Down

0 comments on commit 0864ede

Please sign in to comment.