aboutsummaryrefslogtreecommitdiff
path: root/hw/intc
diff options
context:
space:
mode:
authorBALATON Zoltan <balaton@eik.bme.hu>2021-10-29 23:02:09 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-10-30 18:39:37 +0200
commit32331787896104022deb024906f1cca9606cfdc6 (patch)
treed4eff1a15b6082975c97fcc9265d94c2aa7d304b /hw/intc
parent36cf5ee8852a3aac56be160ad87cc49974278c46 (diff)
downloadqemu-32331787896104022deb024906f1cca9606cfdc6.zip
qemu-32331787896104022deb024906f1cca9606cfdc6.tar.gz
qemu-32331787896104022deb024906f1cca9606cfdc6.tar.bz2
hw/intc/sh_intc: Remove unneeded local variable initialisers
The sh_intc_locate function will either init these or not return so no need to initialise them. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <15e04aa665c68ab5df47bbf505346d413be2fc1c.1635541329.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/intc')
-rw-r--r--hw/intc/sh_intc.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/hw/intc/sh_intc.c b/hw/intc/sh_intc.c
index 3356b42..c9b0b0c 100644
--- a/hw/intc/sh_intc.c
+++ b/hw/intc/sh_intc.c
@@ -195,14 +195,13 @@ static void sh_intc_toggle_mask(struct intc_desc *desc, intc_enum id,
}
}
-static uint64_t sh_intc_read(void *opaque, hwaddr offset,
- unsigned size)
+static uint64_t sh_intc_read(void *opaque, hwaddr offset, unsigned size)
{
struct intc_desc *desc = opaque;
- intc_enum *enum_ids = NULL;
- unsigned int first = 0;
- unsigned int width = 0;
- unsigned int mode = 0;
+ intc_enum *enum_ids;
+ unsigned int first;
+ unsigned int width;
+ unsigned int mode;
unsigned long *valuep;
sh_intc_locate(desc, (unsigned long)offset, &valuep,
@@ -215,12 +214,12 @@ static void sh_intc_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
struct intc_desc *desc = opaque;
- intc_enum *enum_ids = NULL;
- unsigned int first = 0;
- unsigned int width = 0;
- unsigned int mode = 0;
- unsigned int k;
+ intc_enum *enum_ids;
+ unsigned int first;
+ unsigned int width;
+ unsigned int mode;
unsigned long *valuep;
+ unsigned int k;
unsigned long mask;
trace_sh_intc_write(size, (uint64_t)offset, value);