From patchwork Wed Jun 1 12:56:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Fergeau X-Patchwork-Id: 98184 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6966EB6EDF for ; Wed, 1 Jun 2011 23:24:45 +1000 (EST) Received: from localhost ([::1]:52183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRlPc-0006kp-CU for incoming@patchwork.ozlabs.org; Wed, 01 Jun 2011 09:24:40 -0400 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 Received: from localhost.localdomain (ovpn-113-86.phx2.redhat.com [10.3.113.86]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p51CuXXH031284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 1 Jun 2011 08:56:37 -0400 From: Christophe Fergeau To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann , Christophe Fergeau Subject: [Qemu-devel] [PATCH 2/3] ehci: Fix unused-but-set-variable warning X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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;