summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Garber <jgarber1@ualberta.ca>2019-08-06 16:10:20 -0600
committerCommit Bot <commit-bot@chromium.org>2019-08-07 21:02:39 +0000
commitae3a69817d117a9b50dc404f6e2ceda1e74f29d6 (patch)
tree01b33fbe615f9266375c688db22e932e878530b7
parent3e15a29568e40ceb6393d092c6488ef25eb96256 (diff)
downloadvboot-ae3a69817d117a9b50dc404f6e2ceda1e74f29d6.tar.gz
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 <jgarber1@ualberta.ca> Found-by: Coverity CID 198900 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1740446 Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Joel Kitching <kitching@chromium.org>
-rw-r--r--firmware/lib/cgptlib/cgptlib.c1
-rw-r--r--firmware/lib/vboot_ui.c2
2 files changed, 3 insertions, 0 deletions
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);