From: Thomas Huth Date: Tue, 20 Oct 2020 15:39:34 +0000 (+0200) Subject: hw/timer/sh_timer: Silence warnings about missing fallthrough statements X-Git-Tag: v5.2.0-rc0~24^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=97edd8ba4b167b6adfbda9598280e5b31270fd40;p=thirdparty%2Fqemu.git hw/timer/sh_timer: Silence warnings about missing fallthrough statements When compiling with -Werror=implicit-fallthrough, gcc complains about missing fallthrough annotations in this file. Looking at the code, the fallthrough is very likely intended here, so add some comments to silence the compiler warnings. Fixes: cd1a3f6840e ("Stand-alone TMU emulation code") Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201020153935.54315-3-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- diff --git a/hw/timer/sh_timer.c b/hw/timer/sh_timer.c index b09e30f9388..934daaa7dcc 100644 --- a/hw/timer/sh_timer.c +++ b/hw/timer/sh_timer.c @@ -122,6 +122,7 @@ static void sh_timer_write(void *opaque, hwaddr offset, if (s->feat & TIMER_FEAT_EXTCLK) { break; } + /* fallthrough */ default: hw_error("sh_timer_write: Reserved TPSC value\n"); break; @@ -135,6 +136,7 @@ static void sh_timer_write(void *opaque, hwaddr offset, if (s->feat & TIMER_FEAT_EXTCLK) { break; } + /* fallthrough */ default: hw_error("sh_timer_write: Reserved CKEG value\n"); break; @@ -147,6 +149,7 @@ static void sh_timer_write(void *opaque, hwaddr offset, if (s->feat & TIMER_FEAT_CAPT) { break; } + /* fallthrough */ default: hw_error("sh_timer_write: Reserved ICPE value\n"); break; @@ -180,6 +183,7 @@ static void sh_timer_write(void *opaque, hwaddr offset, s->tcpr = value; break; } + /* fallthrough */ default: hw_error("sh_timer_write: Bad offset %x\n", (int)offset); }