From: Christophe Fergeau <cfergeau@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
Christophe Fergeau <cfergeau@redhat.com>
Subject: [Qemu-devel] [PATCH 2/3] ehci: Fix unused-but-set-variable warning
Date: Wed, 1 Jun 2011 14:56:31 +0200 [thread overview]
Message-ID: <1306932992-30075-3-git-send-email-cfergeau@redhat.com> (raw)
In-Reply-To: <1306932992-30075-1-git-send-email-cfergeau@redhat.com>
This warning is new in gcc 4.6.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
---
hw/usb-ehci.c | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c
index f63519e..8a7b1bb 100644
--- a/hw/usb-ehci.c
+++ b/hw/usb-ehci.c
@@ -523,11 +523,8 @@ static void ehci_detach(USBPort *port)
static void ehci_reset(void *opaque)
{
EHCIState *s = opaque;
- uint8_t *pci_conf;
int i;
- pci_conf = s->dev.config;
-
memset(&s->mmio[OPREGBASE], 0x00, MMIO_SIZE - OPREGBASE);
s->usbcmd = NB_MAXINTRATE << USBCMD_ITC_SH;
@@ -1105,18 +1102,15 @@ static int ehci_process_itd(EHCIState *ehci,
int ret;
int i, j;
int ptr;
- int pid;
int pg;
int len;
int dir;
int devadr;
int endp;
- int maxpkt;
dir =(itd->bufptr[1] & ITD_BUFPTR_DIRECTION);
devadr = get_field(itd->bufptr[0], ITD_BUFPTR_DEVADDR);
endp = get_field(itd->bufptr[0], ITD_BUFPTR_EP);
- maxpkt = get_field(itd->bufptr[1], ITD_BUFPTR_MAXPKT);
for(i = 0; i < 8; i++) {
if (itd->transact[i] & ITD_XACT_ACTIVE) {
@@ -1134,11 +1128,8 @@ static int ehci_process_itd(EHCIState *ehci,
DPRINTF("ISOCH: buffer %08X len %d\n", ptr, len);
- if (!dir) {
+ if (!dir)
cpu_physical_memory_rw(ptr, &ehci->buffer[0], len, 0);
- pid = USB_TOKEN_OUT;
- } else
- pid = USB_TOKEN_IN;
ret = USB_RET_NODEV;
--
1.7.5.2
next prev parent reply other threads:[~2011-06-01 12:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 12:56 [Qemu-devel] [PATCH 0/3] Fix unused-but-set-variable warnings Christophe Fergeau
2011-06-01 12:56 ` [Qemu-devel] [PATCH 1/3] lsi: Fix unused-but-set-variable warning Christophe Fergeau
2011-06-01 14:19 ` Paolo Bonzini
2011-06-10 16:36 ` Peter Maydell
2011-06-10 19:21 ` Richard Henderson
2011-06-10 18:45 ` Stefan Hajnoczi
2011-06-01 12:56 ` Christophe Fergeau [this message]
2011-06-01 15:53 ` [Qemu-devel] [PATCH 2/3] ehci: " David Ahern
2011-06-01 16:21 ` Christophe Fergeau
2011-06-01 12:56 ` [Qemu-devel] [PATCH 3/3] linux-user: " Christophe Fergeau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1306932992-30075-3-git-send-email-cfergeau@redhat.com \
--to=cfergeau@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).