aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2010-03-17 16:00:24 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2010-03-19 15:27:27 -0500
commitddbda4323e2bdc7cb3925b0f4080f9eb836a09e8 (patch)
tree32c6e3fec7464ce7f7efacc6c3c4d335b574d629
parent4bed9837309e58d208183f81d8344996744292cf (diff)
Revert "usb-linux: remove unreachable default in switch statement"
This reverts commit 3c9c706c3b66d838942aba53c0d3fdcdf06c7423. This breaks build (gcc 4.3.2): CC usb-linux.o cc1: warnings being treated as errors /src/qemu/usb-linux.c: In function 'usb_linux_update_endp_table': /src/qemu/usb-linux.c:759: error: 'type' may be used uninitialized in this function Reported-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--usb-linux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usb-linux.c b/usb-linux.c
index 1ecfbc4565..d0d7cff496 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -846,6 +846,9 @@ static int usb_linux_update_endp_table(USBHostDevice *s)
case 0x03:
type = USBDEVFS_URB_TYPE_INTERRUPT;
break;
+ default:
+ DPRINTF("usb_host: malformed endpoint type\n");
+ type = USBDEVFS_URB_TYPE_BULK;
}
s->endp_table[(devep & 0xf) - 1].type = type;
s->endp_table[(devep & 0xf) - 1].halted = 0;