[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/6] hw/timer/aspeed_timer: Add a fall through comment
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 4/6] hw/timer/aspeed_timer: Add a fall through comment |
Date: |
Tue, 17 Dec 2019 18:34:23 +0100 |
Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2:
hw/timer/aspeed_timer.c: In function ‘aspeed_timer_set_value’:
hw/timer/aspeed_timer.c:283:24: error: this statement may fall through
[-Werror=implicit-fallthrough=]
283 | if (old_reload || !t->reload) {
| ~~~~~~~~~~~^~~~~~~~~~~~~
hw/timer/aspeed_timer.c:287:5: note: here
287 | case TIMER_REG_STATUS:
| ^~~~
cc1: all warnings being treated as errors
Add the missing fall through comment.
Fixes: 1403f364472
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
Cc: "Cédric Le Goater" <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: Andrew Jeffery <address@hidden>
Cc: Joel Stanley <address@hidden>
Cc: address@hidden
---
hw/timer/aspeed_timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/timer/aspeed_timer.c b/hw/timer/aspeed_timer.c
index a8c38cc118..c91f18415c 100644
--- a/hw/timer/aspeed_timer.c
+++ b/hw/timer/aspeed_timer.c
@@ -283,7 +283,7 @@ static void aspeed_timer_set_value(AspeedTimerCtrlState *s,
int timer, int reg,
if (old_reload || !t->reload) {
break;
}
-
+ /* fall through to re-enable */
case TIMER_REG_STATUS:
if (timer_enabled(t)) {
uint64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
--
2.21.0
- Re: [PATCH 1/6] audio/audio: Add missing fall through comment, (continued)
[PATCH 2/6] hw/display/tcx: Add missing fall through comments, Philippe Mathieu-Daudé, 2019/12/17
[PATCH 3/6] hw/net/imx_fec: Rewrite fall through comments, Philippe Mathieu-Daudé, 2019/12/17
[PATCH 4/6] hw/timer/aspeed_timer: Add a fall through comment,
Philippe Mathieu-Daudé <=
[PATCH 5/6] hw/scsi/megasas: Silent GCC9 duplicated-cond warning, Philippe Mathieu-Daudé, 2019/12/17
[PATCH 6/6] qemu-io-cmds: Silent GCC9 format-overflow warning, Philippe Mathieu-Daudé, 2019/12/17