summaryrefslogtreecommitdiffstats
path: root/hw/usb-ohci.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-04-25 18:23:04 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-04-25 18:23:04 +0000
commitd4c4e6fdc7f5077fba3446f6e650eb94d07a0be5 (patch)
tree30a0e68d4a839c12488f2e234a9cb8cb4e2aaa62 /hw/usb-ohci.c
parent7300c07991e05e66e04528aa1c72e31c127a79cd (diff)
downloadhqemu-d4c4e6fdc7f5077fba3446f6e650eb94d07a0be5.zip
hqemu-d4c4e6fdc7f5077fba3446f6e650eb94d07a0be5.tar.gz
usb: remove dead assignments, spotted by clang analyzer
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/usb-ohci.c')
-rw-r--r--hw/usb-ohci.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c
index 7cd5ca0..9f80e15 100644
--- a/hw/usb-ohci.c
+++ b/hw/usb-ohci.c
@@ -599,7 +599,9 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed,
{
int dir;
size_t len = 0;
+#ifdef DEBUG_ISOCH
const char *str = NULL;
+#endif
int pid;
int ret;
int i;
@@ -663,15 +665,21 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed,
dir = OHCI_BM(ed->flags, ED_D);
switch (dir) {
case OHCI_TD_DIR_IN:
+#ifdef DEBUG_ISOCH
str = "in";
+#endif
pid = USB_TOKEN_IN;
break;
case OHCI_TD_DIR_OUT:
+#ifdef DEBUG_ISOCH
str = "out";
+#endif
pid = USB_TOKEN_OUT;
break;
case OHCI_TD_DIR_SETUP:
+#ifdef DEBUG_ISOCH
str = "setup";
+#endif
pid = USB_TOKEN_SETUP;
break;
default:
@@ -834,7 +842,9 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed)
{
int dir;
size_t len = 0;
+#ifdef DEBUG_PACKET
const char *str = NULL;
+#endif
int pid;
int ret;
int i;
@@ -871,15 +881,21 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed)
switch (dir) {
case OHCI_TD_DIR_IN:
+#ifdef DEBUG_PACKET
str = "in";
+#endif
pid = USB_TOKEN_IN;
break;
case OHCI_TD_DIR_OUT:
+#ifdef DEBUG_PACKET
str = "out";
+#endif
pid = USB_TOKEN_OUT;
break;
case OHCI_TD_DIR_SETUP:
+#ifdef DEBUG_PACKET
str = "setup";
+#endif
pid = USB_TOKEN_SETUP;
break;
default:
OpenPOWER on IntegriCloud