Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 May 2022 23:24:01 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e66d34dfc5c2 - stable/13 - Assert that invalid bus widths can't be passed to bus_width_str().
Message-ID:  <202205102324.24ANO1bt072263@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=e66d34dfc5c2f2c61fd534e3fc99feb22417ebb6

commit e66d34dfc5c2f2c61fd534e3fc99feb22417ebb6
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2021-09-15 16:03:17 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-05-10 22:51:49 +0000

    Assert that invalid bus widths can't be passed to bus_width_str().
    
    This appeases a -Wreturn-type warning from GCC.
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D31935
    
    (cherry picked from commit d2bc7754a226c031b76184277e32c4d65a763f67)
---
 sys/cam/mmc/mmc_da.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c
index e13bee75c216..886b3ca2329f 100644
--- a/sys/cam/mmc/mmc_da.c
+++ b/sys/cam/mmc/mmc_da.c
@@ -1174,6 +1174,8 @@ static inline const char
 		return ("4-bit");
 	case bus_width_8:
 		return ("8-bit");
+	default:
+		__assert_unreachable();
 	}
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202205102324.24ANO1bt072263>