From ae3a69817d117a9b50dc404f6e2ceda1e74f29d6 Mon Sep 17 00:00:00 2001 From: Jacob Garber Date: Tue, 6 Aug 2019 16:10:20 -0600 Subject: firmware/lib: Add fall through comments Implicit fall throughs are a source of Coverity Scan issues, so add comments to mark these instances as intentional. BUG=none TEST=make clean && make runtests BRANCH=none Change-Id: Ic302dcf8998fb1081e5b8258ba703a7527911eee Signed-off-by: Jacob Garber Found-by: Coverity CID 198900 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1740446 Reviewed-by: Julius Werner Reviewed-by: Joel Kitching --- firmware/lib/cgptlib/cgptlib.c | 1 + firmware/lib/vboot_ui.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/firmware/lib/cgptlib/cgptlib.c b/firmware/lib/cgptlib/cgptlib.c index 449ed2f0..0995b945 100644 --- a/firmware/lib/cgptlib/cgptlib.c +++ b/firmware/lib/cgptlib/cgptlib.c @@ -146,6 +146,7 @@ int GptUpdateKernelWithEntry(GptData *gpt, GptEntry *e, uint32_t update_type) } /* Out of tries, so drop through and mark partition bad. */ } + /* fall through */ case GPT_UPDATE_ENTRY_BAD: { /* Giving up on this partition entirely. */ if (!GetEntrySuccessful(e)) { diff --git a/firmware/lib/vboot_ui.c b/firmware/lib/vboot_ui.c index 51167801..acce8ca9 100644 --- a/firmware/lib/vboot_ui.c +++ b/firmware/lib/vboot_ui.c @@ -274,6 +274,7 @@ static vb2_error_t vb2_enter_vendor_data_ui(struct vb2_context *ctx, return VBERROR_SUCCESS; case 'a'...'z': key = toupper(key); + /* fall through */ case '0'...'9': case 'A'...'Z': if ((len > 0 && is_vowel(key)) || @@ -609,6 +610,7 @@ static vb2_error_t vb2_developer_ui(struct vb2_context *ctx) /* Only disable virtual dev switch if allowed by GBB */ if (!(gbb->flags & VB2_GBB_FLAG_ENTER_TRIGGERS_TONORM)) break; + /* fall through */ case ' ': /* See if we should disable virtual dev-mode switch. */ VB2_DEBUG("shared->flags=0x%x\n", shared->flags); -- cgit v1.2.1