Skip to contentSkip to conversation

ALSA: seq: Mark expected switch fall-through

PATCH Applied Gustavo A. R. Silva 2 participants 2 messages Aug 3, 2018 – Aug 4, 2018 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: seq: Mark expected switch fall-through

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

Notice that in this particular case, I replaced the code comment with a proper "fall through" annotation, which is what GCC is expecting to find.

---
 sound/core/seq/seq_midi_emul.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/seq/seq_midi_emul.c +1 -1
index f9f2133..c1975dd 100644
@@ -318,7 +318,7 @@ do_control(struct snd_midi_op *ops, void *drv, struct snd_midi_channel_set *chse
 		break;
 	case MIDI_CTL_MSB_DATA_ENTRY:
 		chan->control[MIDI_CTL_LSB_DATA_ENTRY] = 0;
-		/* go through here */
+		/* fall through */
 	case MIDI_CTL_LSB_DATA_ENTRY:
 		if (chan->param_type == SNDRV_MIDI_PARAM_TYPE_REGISTERED)
 			rpn(ops, drv, chan, chset);
Signature · 1 line
2.7.4
Applied
#1 lore raw
Quoted 9 lines · Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

Notice that in this particular case, I replaced the code comment with a proper "fall through" annotation, which is what GCC is expecting to find.

Applied, thanks.

Takashi