From cc5862a7685fa8eb59fabddbdb1054db8eb5d662 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Thu, 25 Sep 2008 11:07:13 +0000 Subject: Add 'default:' stanza to switch() to make clear that 'status' is always initialized. From NetBSD. "won't hurt" miod@. --- sys/dev/usb/umass.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev/usb/umass.c') diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c index 764b09633ac..139648f6d39 100644 --- a/sys/dev/usb/umass.c +++ b/sys/dev/usb/umass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umass.c,v 1.57 2008/06/26 05:42:18 ray Exp $ */ +/* $OpenBSD: umass.c,v 1.58 2008/09/25 11:07:12 krw Exp $ */ /* $NetBSD: umass.c,v 1.116 2004/06/30 05:53:46 mycroft Exp $ */ /* @@ -1740,8 +1740,6 @@ umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv, sc->transfer_cb(sc, sc->transfer_priv, sc->transfer_datalen - sc->transfer_actlen, status); } else { - int status; - /* Command Interrupt Data Block */ DPRINTF(UDMASS_CBI, ("%s: type=0x%02x, value=0x%02x\n", @@ -1749,6 +1747,7 @@ umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv, sc->sbl.common.type, sc->sbl.common.value)); if (sc->sbl.common.type == IDB_TYPE_CCI) { + int status; switch (sc->sbl.common.value & IDB_VALUE_STATUS_MASK) { case IDB_VALUE_PASS: @@ -1759,6 +1758,7 @@ umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv, status = STATUS_CMD_FAILED; break; case IDB_VALUE_PHASE: + default: status = STATUS_WIRE_FAILED; break; } -- cgit v1.2.3