Skip to content

Commit

Permalink
alsa: fix a switch fallthrough warning
Browse files Browse the repository at this point in the history
  • Loading branch information
radarsat1 committed Aug 14, 2018
1 parent d2fd4dc commit 3155671
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions RtMidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1567,6 +1567,7 @@ static void *alsaMidiHandler( void *ptr )
break;
}
}
break;

default:
doDecode = true;
Expand Down

1 comment on commit 3155671

@keinstein
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I see, this is the wrong solution. I didn't test it but it seems to break SysEx messages.
There are two solutions:

  • add doDecode = true before the added break
  • use fallthrough syntax from C++11
    The second one is implemented in pull request Implement a reliable port selection API #30. There I have spent some time to get it running for pre C++11 compilers as well as for C++11 conforming compilers that emit warnings.

Please sign in to comment.