aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNick Bray <ncbray@google.com>2019-12-06 14:19:05 -0800
committerNick Bray <ncbray@google.com>2019-12-06 14:20:14 -0800
commit84464b2f030a147975af644f64ac398f14dddd6c (patch)
tree0b0012390679476f1327b5f70e39e6daf52de0d1 /lib
parent6377decd5527ebc2ac0b572354f2fce6846caee3 (diff)
downloadcommon-84464b2f030a147975af644f64ac398f14dddd6c.tar.gz
More fixes for -Wimplicit-fallthrough
Bug: 139945549 Change-Id: Ia0495b1b32be87f4cd4b1a4e34cb9f931b8493fa
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/printf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/printf.c b/lib/libc/printf.c
index ef747075..d182ceba 100644
--- a/lib/libc/printf.c
+++ b/lib/libc/printf.c
@@ -531,9 +531,9 @@ next_format:
goto hex;
case 'X':
flags |= CAPSFLAG;
- /* fallthrough */
-hex:
+ goto hex;
case 'x':
+hex:
n = (flags & LONGLONGFLAG) ? va_arg(ap, unsigned long long) :
(flags & LONGFLAG) ? va_arg(ap, unsigned long) :
(flags & HALFHALFFLAG) ? (unsigned char)va_arg(ap, unsigned int) :
@@ -566,7 +566,7 @@ hex:
#if FLOAT_PRINTF
case 'F':
flags |= CAPSFLAG;
- /* fallthrough */
+ __FALLTHROUGH;
case 'f': {
double d = va_arg(ap, double);
s = double_to_string(num_buffer, sizeof(num_buffer), d, flags);
@@ -574,7 +574,7 @@ hex:
}
case 'A':
flags |= CAPSFLAG;
- /* fallthrough */
+ __FALLTHROUGH;
case 'a': {
double d = va_arg(ap, double);
s = double_to_hexstring(num_buffer, sizeof(num_buffer), d, flags);