From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nod58-0007Y1-7l for qemu-devel@nongnu.org; Mon, 08 Mar 2010 08:33:14 -0500 Received: from [199.232.76.173] (port=56474 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nod57-0007XQ-Ck for qemu-devel@nongnu.org; Mon, 08 Mar 2010 08:33:13 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nod56-0003hd-S2 for qemu-devel@nongnu.org; Mon, 08 Mar 2010 08:33:13 -0500 Received: from mx20.gnu.org ([199.232.41.8]:52594) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Nod56-0003hJ-1h for qemu-devel@nongnu.org; Mon, 08 Mar 2010 08:33:12 -0500 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nod4f-000241-Ar for qemu-devel@nongnu.org; Mon, 08 Mar 2010 08:32:45 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement Date: Mon, 8 Mar 2010 13:31:26 +0000 References: <1268053115.2130.4.camel@localhost.localdomain> In-Reply-To: <1268053115.2130.4.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003081331.27047.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paul Bolle > Signed-off-by: Paul Bolle > --- > usb-linux.c | 3 --- > 1 files changed, 0 insertions(+), 3 deletions(-) > > diff --git a/usb-linux.c b/usb-linux.c > index a9c15c6..23155dd 100644 > --- a/usb-linux.c > +++ b/usb-linux.c > @@ -846,9 +846,6 @@ 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; > I'd be tempted to replace it by an abort(). If it's provable redundant then the compiler will remove it anyway. If not then we at least get a noisy failure when someone breaks it. Paul