summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2018-02-19 09:20:46 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2018-02-19 09:20:46 +0000
commitec62784d02d08c1067d8fac6587739277311a75d (patch)
treeb3407d72601634d98f35e0111af545930fadfc48 /sys
parent2313c9419a17b97cd9f51651d1adb3b2184e642d (diff)
Add a default case to a usb_tap() switch statement which mpi@ says will
never be called to convince compilers and static analysis tools a path that uses uninitialised memory does not exist. ok krw@ mpi@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/usb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index 0320d153835..a2f3c568bc8 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb.c,v 1.116 2018/02/19 08:59:52 mpi Exp $ */
+/* $OpenBSD: usb.c,v 1.117 2018/02/19 09:20:45 jsg Exp $ */
/* $NetBSD: usb.c,v 1.77 2003/01/01 00:10:26 thorpej Exp $ */
/*
@@ -1020,6 +1020,8 @@ usb_tap(struct usbd_bus *bus, struct usbd_xfer *xfer, uint8_t dir)
uph->uph_hlen = htole16(sizeof(*uph));
uph->uph_xfertype = USBPCAP_TRANSFER_INTERRUPT;
break;
+ default:
+ return;
}
uph->uph_id = 0; /* not yet used */