[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/20] hw/gpio/aspeed_gpio: Remove dead assignment
From: |
Laurent Vivier |
Subject: |
[PULL 18/20] hw/gpio/aspeed_gpio: Remove dead assignment |
Date: |
Mon, 4 May 2020 13:57:56 +0200 |
From: Philippe Mathieu-Daudé <address@hidden>
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 <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
hw/gpio/aspeed_gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/gpio/aspeed_gpio.c b/hw/gpio/aspeed_gpio.c
index e52fcfd9a030..4c75b5c80cc9 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];
--
2.26.2
- [PULL 03/20] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write(), (continued)
- [PULL 03/20] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write(), Laurent Vivier, 2020/05/04
- [PULL 13/20] blockdev: Remove dead assignment, Laurent Vivier, 2020/05/04
- [PULL 04/20] crypto: Redundant type conversion for AES_KEY pointer, Laurent Vivier, 2020/05/04
- [PULL 10/20] chardev: Add macOS to list of OSes that support -chardev serial, Laurent Vivier, 2020/05/04
- [PULL 07/20] hw/mem/pc-dimm: Fix line over 80 characters warning, Laurent Vivier, 2020/05/04
- [PULL 11/20] Compress lines for immediate return, Laurent Vivier, 2020/05/04
- [PULL 14/20] hw/i2c/pm_smbus: Remove dead assignment, Laurent Vivier, 2020/05/04
- [PULL 08/20] elf_ops: Don't try to g_mapped_file_unref(NULL), Laurent Vivier, 2020/05/04
- [PULL 18/20] hw/gpio/aspeed_gpio: Remove dead assignment,
Laurent Vivier <=
- [PULL 05/20] MAINTAINERS: Mark the LatticeMico32 target as orphan, Laurent Vivier, 2020/05/04
- [PULL 16/20] hw/ide/sii3112: Remove dead assignment, Laurent Vivier, 2020/05/04
- [PULL 12/20] block: Avoid dead assignment, Laurent Vivier, 2020/05/04
- [PULL 19/20] hw/timer/stm32f2xx_timer: Remove dead assignment, Laurent Vivier, 2020/05/04
- [PULL 20/20] hw/timer/pxa2xx_timer: Add assertion to silent static analyzer warning, Laurent Vivier, 2020/05/04
- [PULL 17/20] hw/isa/i82378: Remove dead assignment, Laurent Vivier, 2020/05/04
- [PULL 15/20] hw/input/adb-kbd: Remove dead assignment, Laurent Vivier, 2020/05/04
- Re: [PULL 00/20] Trivial branch for 5.1 patches, Peter Maydell, 2020/05/04