x86: remove dead assignments, spotted by clang analyzer

Value stored is never read.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
diff --git a/hw/acpi.c b/hw/acpi.c
index 5c01c2e..e3b63b7 100644
--- a/hw/acpi.c
+++ b/hw/acpi.c
@@ -88,8 +88,7 @@
 static int get_pmsts(PIIX4PMState *s)
 {
     int64_t d;
-    int pmsts;
-    pmsts = s->pmsts;
+
     d = muldiv64(qemu_get_clock(vm_clock), PM_FREQ, get_ticks_per_sec());
     if (d >= s->tmr_overflow_time)
         s->pmsts |= TMROF_EN;
@@ -206,8 +205,8 @@
 static void pm_ioport_writel(void *opaque, uint32_t addr, uint32_t val)
 {
     //    PIIX4PMState *s = opaque;
-    addr &= 0x3f;
 #ifdef DEBUG
+    addr &= 0x3f;
     printf("PM writel port=0x%04x val=0x%08x\n", addr, val);
 #endif
 }
diff --git a/hw/i8259.c b/hw/i8259.c
index 37ef04e..ea48e0e 100644
--- a/hw/i8259.c
+++ b/hw/i8259.c
@@ -234,7 +234,9 @@
                 irq2 = 7;
             }
             intno = s->pics[1].irq_base + irq2;
+#if defined(DEBUG_PIC) || defined(DEBUG_IRQ_LATENCY)
             irq = irq2 + 8;
+#endif
         } else {
             intno = s->pics[0].irq_base + irq;
         }
diff --git a/hw/parallel.c b/hw/parallel.c
index 12693d4..be8e2d5 100644
--- a/hw/parallel.c
+++ b/hw/parallel.c
@@ -414,15 +414,14 @@
 
 static void parallel_ioport_ecp_write(void *opaque, uint32_t addr, uint32_t val)
 {
-    addr &= 7;
-    pdebug("wecp%d=%02x\n", addr, val);
+    pdebug("wecp%d=%02x\n", addr & 7, val);
 }
 
 static uint32_t parallel_ioport_ecp_read(void *opaque, uint32_t addr)
 {
     uint8_t ret = 0xff;
-    addr &= 7;
-    pdebug("recp%d:%02x\n", addr, ret);
+
+    pdebug("recp%d:%02x\n", addr & 7, ret);
     return ret;
 }
 
diff --git a/hw/pc.c b/hw/pc.c
index b797f21..b659344 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -813,9 +813,7 @@
     ram_addr_t below_4g_mem_size, above_4g_mem_size = 0;
     int bios_size, isa_bios_size;
     PCIBus *pci_bus;
-    ISADevice *isa_dev;
     int piix3_devfn = -1;
-    CPUState *env;
     qemu_irq *cpu_irq;
     qemu_irq *isa_irq;
     qemu_irq *i8259;
@@ -845,7 +843,7 @@
     }
 
     for (i = 0; i < smp_cpus; i++) {
-        env = pc_new_cpu(cpu_model);
+        pc_new_cpu(cpu_model);
     }
 
     vmport_init();
@@ -1014,7 +1012,7 @@
         }
     }
 
-    isa_dev = isa_create_simple("i8042");
+    isa_create_simple("i8042");
     DMA_init(0);
 #ifdef HAS_AUDIO
     audio_init(pci_enabled ? pci_bus : NULL, isa_irq);
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 343fd17..cc45c50 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -105,7 +105,7 @@
 {
     int dom, pci_bus;
     unsigned slot;
-    int type, bus;
+    int type;
     PCIDevice *dev;
     DriveInfo *dinfo = NULL;
     const char *pci_addr = qdict_get_str(qdict, "pci_addr");
@@ -119,7 +119,6 @@
         goto err;
     }
     type = dinfo->type;
-    bus = drive_get_max_bus (type);
 
     switch (type) {
     case IF_SCSI:
diff --git a/hw/vga.c b/hw/vga.c
index bb65677..845dbcc 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -169,7 +169,10 @@
     int vretr_start_line;
     int vretr_end_line;
 
-    int div2, sldiv2, dots;
+    int dots;
+#if 0
+    int div2, sldiv2;
+#endif
     int clocking_mode;
     int clock_sel;
     const int clk_hz[] = {25175000, 28322000, 25175000, 25175000};
@@ -190,8 +193,6 @@
     vretr_end_line = s->cr[0x11] & 0xf;
 
 
-    div2 = (s->cr[0x17] >> 2) & 1;
-    sldiv2 = (s->cr[0x17] >> 3) & 1;
 
     clocking_mode = (s->sr[0x01] >> 3) & 1;
     clock_sel = (s->msr >> 2) & 3;
@@ -216,6 +217,8 @@
     r->htotal = htotal_chars;
 
 #if 0
+    div2 = (s->cr[0x17] >> 2) & 1;
+    sldiv2 = (s->cr[0x17] >> 3) & 1;
     printf (
         "hz=%f\n"
         "htotal = %d\n"