From 4e8de60623f49def9016b8174261e9ab84f79bb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 19 Jul 2019 15:14:24 +0200 Subject: vl: Rewrite a fall through comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC9 is confused by this comment when building with CFLAG -Wimplicit-fallthrough=2: vl.c: In function ‘qemu_ref_timedate’: vl.c:773:15: error: this statement may fall through [-Werror=implicit-fallthrough=] 773 | value -= rtc_realtime_clock_offset; | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ vl.c:775:5: note: here 775 | case QEMU_CLOCK_VIRTUAL: | ^~~~ cc1: all warnings being treated as errors Rewrite the comment using 'fall through' which is recognized by GCC and static analyzers. Reported-by: Stefan Weil Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: John Snow Message-Id: <20190719131425.10835-7-philmd@redhat.com> Signed-off-by: Laurent Vivier --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vl.c') diff --git a/vl.c b/vl.c index edd5390110..1588dd8fc3 100644 --- a/vl.c +++ b/vl.c @@ -772,7 +772,7 @@ static time_t qemu_ref_timedate(QEMUClockType clock) switch (clock) { case QEMU_CLOCK_REALTIME: value -= rtc_realtime_clock_offset; - /* no break */ + /* fall through */ case QEMU_CLOCK_VIRTUAL: value += rtc_ref_start_datetime; break; -- cgit v1.2.3