From nobody Fri May 17 19:31:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vgxs205d2z5LgCC; Fri, 17 May 2024 19:31:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vgxs11nhcz4vGG; Fri, 17 May 2024 19:31:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715974261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ozvb+JrrJ1QE6b3CxDLJ7T3y+3qabLSS/qvr9yyGmS4=; b=LivMF4o+T48nUhj6KFmmAgVTMfQk6Si9yohCIylFN53o4MMXMl+xTpOpmBC8Uhw2tOz0Ri HuYt8dIYTQNYl3RLGHyx+mqZU+XVAK1PWkr8vuO2BY9YEqYVjwe1tUJfqFBBxqvKLSjXvf OjcLWj6ySdpkH1cOurPtBGJjPyDubIrSNHPCNaVPZ30aaGG7xdKUKCpb1e1O/g1qWN0tWD Quj8Kj84FWn9XkkZkchJJTofQ4VWYgeG52RYza/jhIT2qU6FfBxk7QEQBapSceEf9Z0Z3A oQpVsCwFOFhu+5T0nS7lxLLw222g3OXh9SHUfT4KixYLKlf3yLoghd9bGxanPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715974261; a=rsa-sha256; cv=none; b=sVmP9aUfvwYH7CMevx9vRsKbfMmL+2kwQ5gBk1v6dAZ9yZzu7IJqhaFkbHX8co4TsJgENg ky7MLLo06jD0I7rOYIjcRqlle6W5mKwUpJcmJNyxyMmkGqM4jwbmLVPb8zIgAEVsET/lcq fapQkmlmV2cx8U/yOTNr3qw7qMhTCTHPlBBBZanL1nw/bjR2Ld+iJew5sZIn8fJbGxaVKo GvOCnD4hlSxrIaqjkV8x0Ii0iww8jjEWAwEavrhS1Q3x1aDfxxuhJvA28H9rLkxfw88I0N 9kpo6XsWpnzkkW5hGU7aTEQFQYUj+T8DCEZaXH8e4/PoPnoFZBwXgglTogr5rA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715974261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ozvb+JrrJ1QE6b3CxDLJ7T3y+3qabLSS/qvr9yyGmS4=; b=i3pWO78r6q0EaWzNVszgiOHIcRYrkbSvILzv/B6Po3p/2hp3nCMwhLBcDlKZeipaQfHdgC P7FyYyjQuKrGwsvJISe4IRFDi3gqPrASRS5SqzrthxGHrf7F42yTlD/ViIlPHGVcNzKb4/ mY0ZSIuB6HbqKm1mSuFvmdLs3AvzerYQa8EMe1g9HoTnVOi+CqFswxcmpWvV4OGKxa6YDT txMy1YCelNT/qq74daiMEvVMKR12AqK3WybC5kQyypYkrm10qOBT1uwbrEfbS7jW8iGArf cU9Ml2lrrLLMGCRdKHeaYkSqH/438hPALyy2aaYLscJXzoQcRix1fPlvqywvAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vgxs11Q2VzvyC; Fri, 17 May 2024 19:31:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44HJV1kb099631; Fri, 17 May 2024 19:31:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44HJV1jj099628; Fri, 17 May 2024 19:31:01 GMT (envelope-from git) Date: Fri, 17 May 2024 19:31:01 GMT Message-Id: <202405171931.44HJV1jj099628@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: e6e7bf7087fb - stable/14 - sound: Add __assert_unreachable() to default cases in pcm_chn_add() and pcm_chn_remove() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e6e7bf7087fb50a404f684092bd522ece2533d34 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e6e7bf7087fb50a404f684092bd522ece2533d34 commit e6e7bf7087fb50a404f684092bd522ece2533d34 Author: Christos Margiolis AuthorDate: 2024-05-06 18:26:56 +0000 Commit: Christos Margiolis CommitDate: 2024-05-17 19:30:34 +0000 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 cc19d119ac36..2787c0ee126d 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);