libc: enable -Wimplicit-fallthrough
libc had some -Wimplicit-fallthrough warnings. They all seem to be
benign. We're trying to enable this flag globally, so we need to
annotate these breaks here.
Bug: 112564944
Test: Builds
Change-Id: I5afae694cc4cf26ad1a61e2c8ae91f00cda7c733
diff --git a/libc/stdio/printf_common.h b/libc/stdio/printf_common.h
index 9b7c329..ad4fe35 100644
--- a/libc/stdio/printf_common.h
+++ b/libc/stdio/printf_common.h
@@ -48,6 +48,8 @@
#include <unistd.h>
#include <wchar.h>
+#include <private/bionic_macros.h>
+
#include "fvwrite.h"
#include "gdtoa.h"
#include "local.h"
@@ -472,7 +474,7 @@
goto rflag;
case 'C':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ __BIONIC_FALLTHROUGH;
case 'c':
if (flags & LONGINT)
ADDTYPE(T_WINT);
@@ -481,7 +483,7 @@
break;
case 'D':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ __BIONIC_FALLTHROUGH;
case 'd':
case 'i':
ADDSARG();
@@ -503,7 +505,7 @@
__fortify_fatal("%%n not allowed on Android");
case 'O':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ __BIONIC_FALLTHROUGH;
case 'o':
ADDUARG();
break;
@@ -512,13 +514,13 @@
break;
case 'S':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ __BIONIC_FALLTHROUGH;
case 's':
ADDTYPE((flags & LONGINT) ? TP_WCHAR : TP_CHAR);
break;
case 'U':
flags |= LONGINT;
- /*FALLTHROUGH*/
+ __BIONIC_FALLTHROUGH;
case 'u':
case 'X':
case 'x':