mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
hw/ide/sii3112: Remove dead assignment
Fix warning reported by Clang static code analyzer:
CC hw/ide/sii3112.o
hw/ide/sii3112.c:204:9: warning: Value stored to 'val' is never read
val = 0;
^ ~
Fixes: a9dd6604
Reported-by: Clang Static Analyzer
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Acked-by: John Snow <jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200422133152.16770-6-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
1cf5ae5129
commit
22c9336d3a
@ -42,7 +42,7 @@ static uint64_t sii3112_reg_read(void *opaque, hwaddr addr,
|
|||||||
unsigned int size)
|
unsigned int size)
|
||||||
{
|
{
|
||||||
SiI3112PCIState *d = opaque;
|
SiI3112PCIState *d = opaque;
|
||||||
uint64_t val = 0;
|
uint64_t val;
|
||||||
|
|
||||||
switch (addr) {
|
switch (addr) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
@ -126,6 +126,7 @@ static uint64_t sii3112_reg_read(void *opaque, hwaddr addr,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
val = 0;
|
val = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
trace_sii3112_read(size, addr, val);
|
trace_sii3112_read(size, addr, val);
|
||||||
return val;
|
return val;
|
||||||
@ -201,7 +202,7 @@ static void sii3112_reg_write(void *opaque, hwaddr addr,
|
|||||||
d->regs[1].sien = (val >> 16) & 0x3eed;
|
d->regs[1].sien = (val >> 16) & 0x3eed;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
val = 0;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user