From nobody Mon May 06 18:36:32 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 4VY99F00lVz5J2hy; Mon, 06 May 2024 18:36:33 +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 4VY99D5pQCz4sBR; Mon, 6 May 2024 18:36:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715020592; 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=Lj9yE+0O/jA0Nl+jKF5oOnf2WAi4jl+kB9tPwCm4sME=; b=Jg0h2aP0tONgrhzq4PrJm02ELLtuM2wB6ioaYGSUz6sf9F+2iAUP8hUds/rRp7XJV/wOZD eL9PVEt4BV3CDR8JXDbz6dUsogKK1QAEJFoSrLg9ZhsqCcTfQ92LaNIHJ4V9mdbUG94ufW 0ZMeaAKKdWn009Tv6glD/NCEIQBVmW1aTPDQ/QDRVhwxvYenkazBIskwDOclsj/suLNkYw UL2p2O4tSv3xhkbtSLv2lO/HgIzh4NjGdc5nhwYV8xQ5xeXaKCxVGcs7SrdKKhUF+Zq8Fz DTjlSeigUotduMm8XSUixyQvcGqAqZFRg8A2MSJb7q+12w26p07XsSfWJql/8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715020592; a=rsa-sha256; cv=none; b=p+8g4jZnMrbC9TgRFYqKs8LkDRiMDaHHAqXacafaIxyzpxs2f6XGSWu8iFLlj3+6LsW8cd Jx9djbvXc+0m8KvI6m+UaZ9u8MsUIz7fqPimg39wqZEAWDN1p/+UmQiw+EPT+0mVY//TQx J6MAXf67Ox3KpipE2Tegk2HxHs6gk95Y9IAtlcmNJDV0LyQcgH2fVNl2rVj9gYRtfgR41G 4RP8h0IOm0eRhPYy2LTENF4IKHU8fztH7/KmnwFJp/whin+poaw/6axN/oNRrQfVOPgMal RpPbgAxfWrlM1x/lI2kwz+oRpSXu51DdlyGgg1s1DAP+YT+0KhyBY48syvCsmA== 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=1715020592; 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=Lj9yE+0O/jA0Nl+jKF5oOnf2WAi4jl+kB9tPwCm4sME=; b=INTUe1df51gRqxBTFMAsUYiFgfm3eTwSyTzyNJRxZq0Wxns4DKOFHvZHcGWVeacbpLXZ+n I14zEqUS6iyhgxbFX1mwf4WxUgHnN+IhoqGM4FQt3BGRT0DdoIWIP2E2iFA2H56/rzvBR2 4Iopvi1eu2dor+AHJNu1PH+c/RWpEeDE13uLNqIezCgiMFFN6+AqX7nVSs0hSR0PBkWXc5 0eKeOp57K5AU39xc8JLniTcHcaJo0Q8h3PCfeiW2vpUhpy6AGuOWhPfX3dvQGlnoZ9C0O2 2qqevYKr1mK14SD+w4YYYMX8oqQR2SxxuA8zszWuI6TI4+9G+TWwaPJZ8EiiKg== 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 4VY99D5PjSz1712; Mon, 6 May 2024 18:36:32 +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 446IaWss059989; Mon, 6 May 2024 18:36:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 446IaWt2059986; Mon, 6 May 2024 18:36:32 GMT (envelope-from git) Date: Mon, 6 May 2024 18:36:32 GMT Message-Id: <202405061836.446IaWt2059986@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 76f95bae092b - main - 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/main X-Git-Reftype: branch X-Git-Commit: 76f95bae092b7353ff82b7a0056ca5801bb98f76 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=76f95bae092b7353ff82b7a0056ca5801bb98f76 commit 76f95bae092b7353ff82b7a0056ca5801bb98f76 Author: Christos Margiolis AuthorDate: 2024-05-06 18:26:56 +0000 Commit: Christos Margiolis CommitDate: 2024-05-06 18:26:56 +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 --- 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);