diff options
author | 2018-02-19 09:20:45 +0000 | |
---|---|---|
committer | 2018-02-19 09:20:45 +0000 | |
commit | a126f02088f3f363f217db416d602195e9be70c5 (patch) | |
tree | 1053d13b8110e746acf7be418537eeca687dbef9 /sys/dev/usb/usb.c | |
parent | Convert sparc64 to MI mutex. (diff) | |
download | wireguard-openbsd-a126f02088f3f363f217db416d602195e9be70c5.tar.xz wireguard-openbsd-a126f02088f3f363f217db416d602195e9be70c5.zip |
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/dev/usb/usb.c')
-rw-r--r-- | sys/dev/usb/usb.c | 4 |
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 */ |