From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRkyY-0000YW-J6 for qemu-devel@nongnu.org; Wed, 01 Jun 2011 08:56:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRkyW-0000bL-54 for qemu-devel@nongnu.org; Wed, 01 Jun 2011 08:56:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRkyV-0000ai-BQ for qemu-devel@nongnu.org; Wed, 01 Jun 2011 08:56:39 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p51CuccI010954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 1 Jun 2011 08:56:38 -0400 From: Christophe Fergeau Date: Wed, 1 Jun 2011 14:56:31 +0200 Message-Id: <1306932992-30075-3-git-send-email-cfergeau@redhat.com> In-Reply-To: <1306932992-30075-1-git-send-email-cfergeau@redhat.com> References: <1306932992-30075-1-git-send-email-cfergeau@redhat.com> Subject: [Qemu-devel] [PATCH 2/3] ehci: Fix unused-but-set-variable warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Christophe Fergeau This warning is new in gcc 4.6. Signed-off-by: Christophe Fergeau --- 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