[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/11] hw/intc: Remove redundant statement in exynos4210_combiner
From: |
Chen Qun |
Subject: |
[PATCH 10/11] hw/intc: Remove redundant statement in exynos4210_combiner_read() |
Date: |
Thu, 13 Aug 2020 15:37:11 +0800 |
Clang static code analyzer show warning:
hw/intc/exynos4210_combiner.c:231:9: warning: Value stored to 'val' is never
read
val = s->reg_set[offset >> 2];
The default value of 'val' is '0', so we can break the 'default' branch and
return 'val'.
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
---
Cc: Igor Mitsyanko <i.mitsyanko@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
---
hw/intc/exynos4210_combiner.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c
index b8561e4180..e2e745bbaa 100644
--- a/hw/intc/exynos4210_combiner.c
+++ b/hw/intc/exynos4210_combiner.c
@@ -228,8 +228,7 @@ exynos4210_combiner_read(void *opaque, hwaddr offset,
unsigned size)
hw_error("exynos4210.combiner: overflow of reg_set by 0x"
TARGET_FMT_plx "offset\n", offset);
}
- val = s->reg_set[offset >> 2];
- return 0;
+ break;
}
return val;
}
--
2.23.0
- [PATCH 08/11] tcg/optimize: Remove redundant statement in tcg_optimize(), (continued)
- [PATCH 09/11] usb/bus: Remove dead assignment in usb_get_fw_dev_path(), Chen Qun, 2020/08/13
- [PATCH 01/11] hw/arm/virt-acpi-build:Remove dead assignment in build_madt(), Chen Qun, 2020/08/13
- [PATCH 11/11] hw/display/vga:Remove redundant statement in vga_draw_graphic(), Chen Qun, 2020/08/13
- [PATCH 10/11] hw/intc: Remove redundant statement in exynos4210_combiner_read(),
Chen Qun <=
- Re: [PATCH 00/11] trivial patchs for static code analyzer fixes, no-reply, 2020/08/13
- Re: [PATCH 00/11] trivial patchs for static code analyzer fixes, no-reply, 2020/08/13