x86: remove dead assignments, spotted by clang analyzer
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
9678d9501b
commit
7f5b7d3e2c
@ -88,8 +88,7 @@ static uint32_t get_pmtmr(PIIX4PMState *s)
|
||||
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 uint32_t pm_ioport_readw(void *opaque, uint32_t addr)
|
||||
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
|
||||
}
|
||||
|
@ -234,7 +234,9 @@ int pic_read_irq(PicState2 *s)
|
||||
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;
|
||||
}
|
||||
|
@ -414,15 +414,14 @@ parallel_ioport_eppdata_read_hw4(void *opaque, uint32_t addr)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
6
hw/pc.c
6
hw/pc.c
@ -813,9 +813,7 @@ static void pc_init1(ram_addr_t ram_size,
|
||||
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 @@ static void pc_init1(ram_addr_t ram_size,
|
||||
}
|
||||
|
||||
for (i = 0; i < smp_cpus; i++) {
|
||||
env = pc_new_cpu(cpu_model);
|
||||
pc_new_cpu(cpu_model);
|
||||
}
|
||||
|
||||
vmport_init();
|
||||
@ -1014,7 +1012,7 @@ static void pc_init1(ram_addr_t ram_size,
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
@ -105,7 +105,7 @@ void drive_hot_add(Monitor *mon, const QDict *qdict)
|
||||
{
|
||||
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 @@ void drive_hot_add(Monitor *mon, const QDict *qdict)
|
||||
goto err;
|
||||
}
|
||||
type = dinfo->type;
|
||||
bus = drive_get_max_bus (type);
|
||||
|
||||
switch (type) {
|
||||
case IF_SCSI:
|
||||
|
9
hw/vga.c
9
hw/vga.c
@ -169,7 +169,10 @@ static void vga_precise_update_retrace_info(VGACommonState *s)
|
||||
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 @@ static void vga_precise_update_retrace_info(VGACommonState *s)
|
||||
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 @@ static void vga_precise_update_retrace_info(VGACommonState *s)
|
||||
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"
|
||||
|
@ -763,7 +763,6 @@ static void gen_check_io(DisasContext *s, int ot, target_ulong cur_eip,
|
||||
if (s->cc_op != CC_OP_DYNAMIC)
|
||||
gen_op_set_cc_op(s->cc_op);
|
||||
gen_jmp_im(cur_eip);
|
||||
state_saved = 1;
|
||||
}
|
||||
svm_flags |= (1 << (4 + ot));
|
||||
next_eip = s->pc - s->cs_base;
|
||||
@ -7744,7 +7743,7 @@ static inline void gen_intermediate_code_internal(CPUState *env,
|
||||
target_ulong pc_ptr;
|
||||
uint16_t *gen_opc_end;
|
||||
CPUBreakpoint *bp;
|
||||
int j, lj, cflags;
|
||||
int j, lj;
|
||||
uint64_t flags;
|
||||
target_ulong pc_start;
|
||||
target_ulong cs_base;
|
||||
@ -7755,7 +7754,6 @@ static inline void gen_intermediate_code_internal(CPUState *env,
|
||||
pc_start = tb->pc;
|
||||
cs_base = tb->cs_base;
|
||||
flags = tb->flags;
|
||||
cflags = tb->cflags;
|
||||
|
||||
dc->pe = (flags >> HF_PE_SHIFT) & 1;
|
||||
dc->code32 = (flags >> HF_CS32_SHIFT) & 1;
|
||||
|
Loading…
Reference in New Issue
Block a user