From 005c414e5f2a0ace3756da767d3920ac98cb5c76 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sat, 24 Jul 2021 15:39:01 +0100 Subject: Document intentional fallthroughs + fix harmless unintended ones Change-Id: I1ca5b1027ec30cbf61093bab35b980196ed14e6b --- firmware/common/file_internal.c | 1 + firmware/common/vuprintf.c | 1 + 2 files changed, 2 insertions(+) (limited to 'firmware') diff --git a/firmware/common/file_internal.c b/firmware/common/file_internal.c index fe18f90056..5f35e35abc 100644 --- a/firmware/common/file_internal.c +++ b/firmware/common/file_internal.c @@ -647,6 +647,7 @@ int open_stream_internal(const char *path, unsigned int callflags, { case WALK_RC_FOUND_ROOT: IF_MV( rc = rootrc; ) + /* fallthrough */ case WALK_RC_NOT_FOUND: case WALK_RC_FOUND: /* FF_PROBE leaves nothing for caller to clean up */ diff --git a/firmware/common/vuprintf.c b/firmware/common/vuprintf.c index 6a3b29388b..0566e3e37e 100644 --- a/firmware/common/vuprintf.c +++ b/firmware/common/vuprintf.c @@ -753,6 +753,7 @@ static int format_double_radix(double f, if (prec_rem) { prec_rem--; } + /* fallthrough */ case 1: /* %e, %E */ explen = 2; break; -- cgit v1.2.3