summaryrefslogtreecommitdiff
path: root/payloads/libpayload/libc/printf.c
diff options
context:
space:
mode:
authorJacob Garber <jgarber1@ualberta.ca>2019-07-19 17:35:28 -0600
committerMartin Roth <martinroth@google.com>2019-07-21 17:17:42 +0000
commit5f7b1164c56f36d70813c87e46c540e1e4aa03fc (patch)
tree810c2ec404c63339b7b536636dff3c86c9c04cf7 /payloads/libpayload/libc/printf.c
parentae317695e3f03d55fbba1805ff06e004383e67c8 (diff)
libpayload: Enable -Wimplicit-fallthrough
Add comments to intentional fall throughs and enable the warning. Change-Id: I93e071c4fb139fa6e9cd8a1bfb5800f5f4eac50b Signed-off-by: Jacob Garber <jgarber1@ualberta.ca> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34457 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Diffstat (limited to 'payloads/libpayload/libc/printf.c')
-rw-r--r--payloads/libpayload/libc/printf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/payloads/libpayload/libc/printf.c b/payloads/libpayload/libc/printf.c
index cb623aa51a..3896f01b86 100644
--- a/payloads/libpayload/libc/printf.c
+++ b/payloads/libpayload/libc/printf.c
@@ -585,6 +585,7 @@ static int printf_core(const char *fmt, struct printf_spec *ps, va_list ap)
/* Integer values */
case 'P': /* pointer */
flags |= __PRINTF_FLAG_BIGCHARS;
+ /* fall through */
case 'p':
flags |= __PRINTF_FLAG_PREFIX;
base = 16;
@@ -599,10 +600,12 @@ static int printf_core(const char *fmt, struct printf_spec *ps, va_list ap)
case 'd':
case 'i':
flags |= __PRINTF_FLAG_SIGNED;
+ break;
case 'u':
break;
case 'X':
flags |= __PRINTF_FLAG_BIGCHARS;
+ /* fall through */
case 'x':
base = 16;
break;