git: d2bc7754a226 - main - Assert that invalid bus widths can't be passed to bus_width_str().

John Baldwin jhb at FreeBSD.org
Wed Sep 15 16:05:22 UTC 2021


The branch main has been updated by jhb:

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

commit d2bc7754a226c031b76184277e32c4d65a763f67
Author:     John Baldwin <jhb at FreeBSD.org>
AuthorDate: 2021-09-15 16:03:17 +0000
Commit:     John Baldwin <jhb at FreeBSD.org>
CommitDate: 2021-09-15 16:03:17 +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
---
 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 e41792dcebc1..4212e2aa805d 100644
--- a/sys/cam/mmc/mmc_da.c
+++ b/sys/cam/mmc/mmc_da.c
@@ -1178,6 +1178,8 @@ static inline const char
 		return ("4-bit");
 	case bus_width_8:
 		return ("8-bit");
+	default:
+		__assert_unreachable();
 	}
 }
 


More information about the dev-commits-src-all mailing list