[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/59] hw/display/tcx: Add missing fall through comments
From: |
Paolo Bonzini |
Subject: |
[PULL 07/59] hw/display/tcx: Add missing fall through comments |
Date: |
Thu, 23 Jan 2020 14:49:57 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
When building with GCC9 using CFLAG -Wimplicit-fallthrough=2 we get:
hw/display/tcx.c: In function ‘tcx_dac_writel’:
hw/display/tcx.c:453:26: error: this statement may fall through
[-Werror=implicit-fallthrough=]
453 | s->dac_index = (s->dac_index + 1) & 0xff; /* Index
autoincrement */
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/display/tcx.c:454:9: note: here
454 | default:
| ^~~~~~~
hw/display/tcx.c: In function ‘tcx_dac_readl’:
hw/display/tcx.c:412:22: error: this statement may fall through
[-Werror=implicit-fallthrough=]
412 | s->dac_index = (s->dac_index + 1) & 0xff; /* Index
autoincrement */
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/display/tcx.c:413:5: note: here
413 | default:
| ^~~~~~~
cc1: all warnings being treated as errors
Give a hint to GCC by adding the missing fall through comments.
Fixes: 55d7bfe22
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Aleksandar Markovic <address@hidden>
Reviewed-by: Mark Cave-Ayland <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/display/tcx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index 14e829d..abbeb30 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -410,6 +410,7 @@ static uint64_t tcx_dac_readl(void *opaque, hwaddr addr,
case 2:
val = s->b[s->dac_index] << 24;
s->dac_index = (s->dac_index + 1) & 0xff; /* Index autoincrement */
+ /* fall through */
default:
s->dac_state = 0;
break;
@@ -451,6 +452,7 @@ static void tcx_dac_writel(void *opaque, hwaddr addr,
uint64_t val,
s->b[index] = val >> 24;
update_palette_entries(s, index, index + 1);
s->dac_index = (s->dac_index + 1) & 0xff; /* Index autoincrement */
+ /* fall through */
default:
s->dac_state = 0;
break;
--
1.8.3.1
- [PULL v2 00/59] Misc (x86 and QOM) patches for 2020-01-23, Paolo Bonzini, 2020/01/23
- [PULL 01/59] cpu: Introduce cpu_class_set_parent_reset(), Paolo Bonzini, 2020/01/23
- [PULL 02/59] cpu: Use cpu_class_set_parent_reset(), Paolo Bonzini, 2020/01/23
- [PULL 03/59] pvpanic: introduce crashloaded for pvpanic, Paolo Bonzini, 2020/01/23
- [PULL 04/59] pvpanic: implement crashloaded event handling, Paolo Bonzini, 2020/01/23
- [PULL 05/59] qom/object: Display more helpful message when an interface is missing, Paolo Bonzini, 2020/01/23
- [PULL 07/59] hw/display/tcx: Add missing fall through comments,
Paolo Bonzini <=
- [PULL 06/59] audio/audio: Add missing fall through comment, Paolo Bonzini, 2020/01/23
- [PULL 08/59] hw/timer/aspeed_timer: Add a fall through comment, Paolo Bonzini, 2020/01/23
- [PULL 09/59] hw/net/imx_fec: Rewrite fall through comments, Paolo Bonzini, 2020/01/23
- [PULL 10/59] hw/net/imx_fec: Remove unuseful FALLTHROUGH comments, Paolo Bonzini, 2020/01/23
- [PULL 11/59] hw/pci-host/designware: Remove unuseful FALLTHROUGH comment, Paolo Bonzini, 2020/01/23
- [PULL 13/59] Makefile: Clarify all the codebase requires qom/ objects, Paolo Bonzini, 2020/01/23
- [PULL 12/59] configure: Do not build libfdt if not required, Paolo Bonzini, 2020/01/23
- [PULL 15/59] Makefile: Remove unhelpful comment, Paolo Bonzini, 2020/01/23
- [PULL 14/59] Makefile: Restrict system emulation and tools objects, Paolo Bonzini, 2020/01/23
- [PULL 16/59] hw/core: Restrict reset handlers API to system-mode, Paolo Bonzini, 2020/01/23