From e6e7bf7087fb50a404f684092bd522ece2533d34 Mon Sep 17 00:00:00 2001 From: Christos Margiolis Date: Mon, 6 May 2024 20:26:56 +0200 Subject: [PATCH] sound: Add __assert_unreachable() to default cases in pcm_chn_add() and pcm_chn_remove() We should normally never enter these cases. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D44994 (cherry picked from commit 76f95bae092b7353ff82b7a0056ca5801bb98f76) --- sys/dev/sound/pcm/sound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index cc19d119ac3..2787c0ee126 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -403,7 +403,7 @@ pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch) d->rvchancount++; break; default: - break; + __assert_unreachable(); } return (0); @@ -443,7 +443,7 @@ pcm_chn_remove(struct snddev_info *d, struct pcm_channel *ch) d->rvchancount--; break; default: - break; + __assert_unreachable(); } return (0);