On 6/9/20 5:13 PM, Kyle Evans wrote: > On Tue, Jun 9, 2020 at 7:09 PM John Baldwin <j...@freebsd.org> wrote: >> >> Author: jhb >> Date: Wed Jun 10 00:09:31 2020 >> New Revision: 361994 >> URL: https://svnweb.freebsd.org/changeset/base/361994 >> >> Log: >> Add some default cases for unreachable code to silence compiler warnings. >> >> This was caused by r361481 when the buffer type was changed from an >> int to an enum. >> >> Reported by: mjg, rpokala >> Sponsored by: Chelsio Communications >> >> Modified: >> head/sys/mips/cavium/cryptocteon/cryptocteon.c >> head/sys/mips/nlm/dev/sec/nlmseclib.c >> >> Modified: head/sys/mips/cavium/cryptocteon/cryptocteon.c >> ============================================================================== >> --- head/sys/mips/cavium/cryptocteon/cryptocteon.c Tue Jun 9 23:03:48 >> 2020 (r361993) >> +++ head/sys/mips/cavium/cryptocteon/cryptocteon.c Wed Jun 10 00:09:31 >> 2020 (r361994) >> @@ -323,6 +323,8 @@ cryptocteon_process(device_t dev, struct cryptop *crp, >> goto done; >> } >> break; >> + default: >> + break; >> } >> >> if (csp->csp_cipher_alg != 0) { >> > > This one could kind of looks like it should also be an > __assert_unreachable(), and perhaps this bit not too long later:
This one is not. It doesn't handle CRYPTO_BUF_CONTIG as there is nothing to do for that case. > case CRYPTO_BUF_CONTIG: > iovlen = crp->crp_buf.cb_buf_len; > od->octo_iov[0].iov_base = crp->crp_buf.cb_buf; > od->octo_iov[0].iov_len = crp->crp_buf.cb_buf_len > iovcnt = 1; > break; > default: > - panic("can't happen"); > + __assert_unreachable(); This could. I don't think we had __assert_unreachable() yet when I committed this. -- John Baldwin _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"