Revert "usb-linux: remove unreachable default in switch statement"

This reverts commit 3c9c706c3b.

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>
This commit is contained in:
Anthony Liguori 2010-03-17 16:00:24 -05:00
parent 4bed983730
commit ddbda4323e

View File

@ -846,6 +846,9 @@ static int usb_linux_update_endp_table(USBHostDevice *s)
case 0x03: case 0x03:
type = USBDEVFS_URB_TYPE_INTERRUPT; type = USBDEVFS_URB_TYPE_INTERRUPT;
break; 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].type = type;
s->endp_table[(devep & 0xf) - 1].halted = 0; s->endp_table[(devep & 0xf) - 1].halted = 0;