From: Philippe Mathieu-Daudé Date: Wed, 22 Apr 2020 13:31:50 +0000 (+0200) Subject: hw/gpio/aspeed_gpio: Remove dead assignment X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6ae1a5a37711c80166b92019174877fc6f73030a;p=qmiga%2Fqemu.git hw/gpio/aspeed_gpio: Remove dead assignment Fix warning reported by Clang static code analyzer: hw/gpio/aspeed_gpio.c:717:18: warning: Value stored to 'g_idx' during its initialization is never read int set_idx, g_idx = *group_idx; ^~~~~ ~~~~~~~~~~ Reported-by: Clang Static Analyzer Reviewed-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200422133152.16770-8-philmd@redhat.com> Signed-off-by: Laurent Vivier --- diff --git a/hw/gpio/aspeed_gpio.c b/hw/gpio/aspeed_gpio.c index e52fcfd9a0..4c75b5c80c 100644 --- a/hw/gpio/aspeed_gpio.c +++ b/hw/gpio/aspeed_gpio.c @@ -712,7 +712,7 @@ static void aspeed_gpio_write(void *opaque, hwaddr offset, uint64_t data, static int get_set_idx(AspeedGPIOState *s, const char *group, int *group_idx) { AspeedGPIOClass *agc = ASPEED_GPIO_GET_CLASS(s); - int set_idx, g_idx = *group_idx; + int set_idx, g_idx; for (set_idx = 0; set_idx < agc->nr_gpio_sets; set_idx++) { const GPIOSetProperties *set_props = &agc->props[set_idx];