diff mbox

[06/11] mips_fulong2e: Delete write only variables

Message ID AANLkTingfBzeU+vCLs0rQ0xBfOnL_30scibY9JJe5jQU@mail.gmail.com
State New
Headers show

Commit Message

Blue Swirl Oct. 6, 2010, 9:33 p.m. UTC
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 <blauwirbel@gmail.com>
---
 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 mbox

Patch

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;