aboutsummaryrefslogtreecommitdiff
path: root/hw/ide
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2020-04-22 15:31:48 +0200
committerLaurent Vivier <laurent@vivier.eu>2020-05-04 14:43:24 +0200
commit22c9336d3a82d1469796b7421cb5bd5f9bfd9748 (patch)
tree9b63dc7dfe60bca9a57de21f29f04e09d9406d2f /hw/ide
parent1cf5ae5129a8e78b9eb2d6545bcc56a8b136eb79 (diff)
downloadqemu-22c9336d3a82d1469796b7421cb5bd5f9bfd9748.zip
qemu-22c9336d3a82d1469796b7421cb5bd5f9bfd9748.tar.gz
qemu-22c9336d3a82d1469796b7421cb5bd5f9bfd9748.tar.bz2
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>
Diffstat (limited to 'hw/ide')
-rw-r--r--hw/ide/sii3112.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c
index d69079c..94d2b57 100644
--- a/hw/ide/sii3112.c
+++ b/hw/ide/sii3112.c
@@ -42,7 +42,7 @@ static uint64_t sii3112_reg_read(void *opaque, hwaddr addr,
unsigned int size)
{
SiI3112PCIState *d = opaque;
- uint64_t val = 0;
+ uint64_t val;
switch (addr) {
case 0x00:
@@ -126,6 +126,7 @@ static uint64_t sii3112_reg_read(void *opaque, hwaddr addr,
break;
default:
val = 0;
+ break;
}
trace_sii3112_read(size, addr, val);
return val;
@@ -201,7 +202,7 @@ static void sii3112_reg_write(void *opaque, hwaddr addr,
d->regs[1].sien = (val >> 16) & 0x3eed;
break;
default:
- val = 0;
+ break;
}
}