qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] usb-linux: Add missing break statement
@ 2011-05-07 20:10 Stefan Weil
  2011-05-08  8:31 ` Hans de Goede
  2011-05-09  7:52 ` Gerd Hoffmann
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Weil @ 2011-05-07 20:10 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Gerd Hoffmann, Hans de Goede

cppcheck report:
usb-linux.c:661: warning: Redundant assignment of "len" in switch

Please check whether adding a break statement
is the correct solution for this warning.

Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 usb-linux.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/usb-linux.c b/usb-linux.c
index 36a01ea..0ef1d26 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -659,6 +659,7 @@ static int usb_host_handle_iso_data(USBHostDevice *s, USBPacket *p, int in)
                         switch(errno) {
                         case ETIMEDOUT:
                             len = USB_RET_NAK;
+                            break;
                         case EPIPE:
                         default:
                             len = USB_RET_STALL;
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] usb-linux: Add missing break statement
  2011-05-07 20:10 [Qemu-devel] [PATCH] usb-linux: Add missing break statement Stefan Weil
@ 2011-05-08  8:31 ` Hans de Goede
  2011-05-09  7:52 ` Gerd Hoffmann
  1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2011-05-08  8:31 UTC (permalink / raw)
  To: Stefan Weil; +Cc: QEMU Developers, Gerd Hoffmann

Thanks, good catch.

Acked-by: Hans de Goede <hdegoede@redhat.com>

On 05/07/2011 10:10 PM, Stefan Weil wrote:
> cppcheck report:
> usb-linux.c:661: warning: Redundant assignment of "len" in switch
>
> Please check whether adding a break statement
> is the correct solution for this warning.
>
> Cc: Hans de Goede<hdegoede@redhat.com>
> Cc: Gerd Hoffmann<kraxel@redhat.com>
> Signed-off-by: Stefan Weil<weil@mail.berlios.de>
> ---
>   usb-linux.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/usb-linux.c b/usb-linux.c
> index 36a01ea..0ef1d26 100644
> --- a/usb-linux.c
> +++ b/usb-linux.c
> @@ -659,6 +659,7 @@ static int usb_host_handle_iso_data(USBHostDevice *s, USBPacket *p, int in)
>                           switch(errno) {
>                           case ETIMEDOUT:
>                               len = USB_RET_NAK;
> +                            break;
>                           case EPIPE:
>                           default:
>                               len = USB_RET_STALL;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] usb-linux: Add missing break statement
  2011-05-07 20:10 [Qemu-devel] [PATCH] usb-linux: Add missing break statement Stefan Weil
  2011-05-08  8:31 ` Hans de Goede
@ 2011-05-09  7:52 ` Gerd Hoffmann
  1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2011-05-09  7:52 UTC (permalink / raw)
  To: Stefan Weil; +Cc: Hans de Goede, QEMU Developers

On 05/07/11 22:10, Stefan Weil wrote:
> cppcheck report:
> usb-linux.c:661: warning: Redundant assignment of "len" in switch

Picked into usb patch queue.

thanks,
   Gerd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-09  7:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-07 20:10 [Qemu-devel] [PATCH] usb-linux: Add missing break statement Stefan Weil
2011-05-08  8:31 ` Hans de Goede
2011-05-09  7:52 ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).