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 <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20201020153935.54315-3-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
This commit is contained in:
parent
2f5af2dcf3
commit
97edd8ba4b
@ -122,6 +122,7 @@ static void sh_timer_write(void *opaque, hwaddr offset,
|
|||||||
if (s->feat & TIMER_FEAT_EXTCLK) {
|
if (s->feat & TIMER_FEAT_EXTCLK) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* fallthrough */
|
||||||
default:
|
default:
|
||||||
hw_error("sh_timer_write: Reserved TPSC value\n");
|
hw_error("sh_timer_write: Reserved TPSC value\n");
|
||||||
break;
|
break;
|
||||||
@ -135,6 +136,7 @@ static void sh_timer_write(void *opaque, hwaddr offset,
|
|||||||
if (s->feat & TIMER_FEAT_EXTCLK) {
|
if (s->feat & TIMER_FEAT_EXTCLK) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* fallthrough */
|
||||||
default:
|
default:
|
||||||
hw_error("sh_timer_write: Reserved CKEG value\n");
|
hw_error("sh_timer_write: Reserved CKEG value\n");
|
||||||
break;
|
break;
|
||||||
@ -147,6 +149,7 @@ static void sh_timer_write(void *opaque, hwaddr offset,
|
|||||||
if (s->feat & TIMER_FEAT_CAPT) {
|
if (s->feat & TIMER_FEAT_CAPT) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* fallthrough */
|
||||||
default:
|
default:
|
||||||
hw_error("sh_timer_write: Reserved ICPE value\n");
|
hw_error("sh_timer_write: Reserved ICPE value\n");
|
||||||
break;
|
break;
|
||||||
@ -180,6 +183,7 @@ static void sh_timer_write(void *opaque, hwaddr offset,
|
|||||||
s->tcpr = value;
|
s->tcpr = value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* fallthrough */
|
||||||
default:
|
default:
|
||||||
hw_error("sh_timer_write: Bad offset %x\n", (int)offset);
|
hw_error("sh_timer_write: Bad offset %x\n", (int)offset);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user