From patchwork Wed Oct 6 21:33:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 66977 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9C000B6EE9 for ; Thu, 7 Oct 2010 08:44:36 +1100 (EST) Received: from localhost ([127.0.0.1]:36134 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3bmr-00076x-Kr for incoming@patchwork.ozlabs.org; Wed, 06 Oct 2010 17:44:33 -0400 Received: from [140.186.70.92] (port=32902 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3bcS-000089-97 for qemu-devel@nongnu.org; Wed, 06 Oct 2010 17:33:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3bcQ-0006u2-7n for qemu-devel@nongnu.org; Wed, 06 Oct 2010 17:33:47 -0400 Received: from mail-qy0-f173.google.com ([209.85.216.173]:47091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3bcQ-0006tt-4P for qemu-devel@nongnu.org; Wed, 06 Oct 2010 17:33:46 -0400 Received: by qyk32 with SMTP id 32so3594642qyk.4 for ; Wed, 06 Oct 2010 14:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=XNxrVzJv+oOF9V201AIIM+eYoTvtYJXM1kz/GOU/urE=; b=oXvfVlD/zodrcqoOA60yjRjO/hs4376wKqnSUhTw8z4lbECImj7of/5moBEX+rjHQk jJL+aeBmN0ARJGua8EA7yT5JNov6KKSxpFPwbl1PFwhuQqW/iGqklRoNK5AcfjWPfcMJ u+1/e0hbhxbCfPvUhEuceIV62f2/sbWdG83L0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=TVkmW/yLPTaIkBDcsSxFzl+zvgY1KeF3k38nWuvZrADZhR3q0MMn1EuqOlMpQaw5bw u2/JTzFdkkGXMT58Y7BQjrUTK2LhfZ1iUxFQ2pQZtL6X5gh8Nv07s/1VTqqKKjtm5q81 G9deLS+dXfYIzOhYqDTgP0hjG1ZaZ6+5q3xI0= Received: by 10.224.28.75 with SMTP id l11mr9988179qac.158.1286400811458; Wed, 06 Oct 2010 14:33:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.31.139 with HTTP; Wed, 6 Oct 2010 14:33:11 -0700 (PDT) From: Blue Swirl Date: Wed, 6 Oct 2010 21:33:11 +0000 Message-ID: To: qemu-devel X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH 06/11] mips_fulong2e: Delete write only variables X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Compiling with GCC 4.6.0 20100925 produced warnings like: /src/qemu/hw/mips_fulong2e.c: In function 'mips_fulong2e_init': /src/qemu/hw/mips_fulong2e.c:274:16: error: variable 'rtc_state' set but not used [-Werror=unused-but-set-variable] /src/qemu/hw/mips_fulong2e.c:268:16: error: variable 'isa_dev' set but not used [-Werror=unused-but-set-variable] /src/qemu/hw/mips_fulong2e.c:261:19: error: variable 'ram_offset' set but not used [-Werror=unused-but-set-variable] Fix by removing the unused variables. Instead of removing, fix ram_offset use. Signed-off-by: Blue Swirl --- hw/mips_fulong2e.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) /* init CPUs */ @@ -297,7 +295,7 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device, ram_offset = qemu_ram_alloc(NULL, "fulong2e.ram", ram_size); bios_offset = qemu_ram_alloc(NULL, "fulong2e.bios", bios_size); - cpu_register_physical_memory(0, ram_size, IO_MEM_RAM); + cpu_register_physical_memory(0, ram_size, ram_offset | IO_MEM_RAM); cpu_register_physical_memory(0x1fc00000LL, bios_size, bios_offset | IO_MEM_ROM); @@ -378,9 +376,9 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device, DMA_init(0, cpu_exit_irq); /* Super I/O */ - isa_dev = isa_create_simple("i8042"); + isa_create_simple("i8042"); - rtc_state = rtc_init(2000, NULL); + rtc_init(2000, NULL); for(i = 0; i < MAX_SERIAL_PORTS; i++) { if (serial_hds[i]) { diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c index df80ef6..d7d1629 100644 --- a/hw/mips_fulong2e.c +++ b/hw/mips_fulong2e.c @@ -265,13 +265,11 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device, qemu_irq *cpu_exit_irq; int via_devfn; PCIBus *pci_bus; - ISADevice *isa_dev; uint8_t *eeprom_buf; i2c_bus *smbus; int i; DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; DeviceState *eeprom; - ISADevice *rtc_state; CPUState *env;