Skip to contentSkip to conversation

ALSA: mixart_core: Mark expected switch fall-through

PATCH Applied Gustavo A. R. Silva 2 participants 2 messages Aug 8, 2018 – Aug 9, 2018 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: mixart_core: 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.

Addresses-Coverity-ID: 114889 ("Missing break in switch")

---
 sound/pci/mixart/mixart_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/mixart/mixart_core.c +1 -1
index 46c292b..71776bf 100644
@@ -540,7 +540,7 @@ irqreturn_t snd_mixart_threaded_irq(int irq, void *dev_id)
 				dev_err(&mgr->pci->dev,
 					"canceled notification %x !\n", msg);
 			}
-			/* no break, continue ! */
+			/* fall through */
 		case MSG_TYPE_ANSWER:
 			/* answer or notification to a message we are waiting for*/
 			mutex_lock(&mgr->msg_lock);
Signature · 1 line
2.7.4
Applied
#1 lore raw
Quoted 10 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.

Addresses-Coverity-ID: 114889 ("Missing break in switch")

Applied, thanks.

Takashi