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 <[email protected]>
Signed-off-by: Chen Qun <[email protected]>
---
Cc: Igor Mitsyanko <[email protected]>
Cc: Peter Maydell <[email protected]>
---
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