summaryrefslogtreecommitdiff
path: root/base/include/android-base/macros.h
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2018-09-13 11:08:41 -0700
committerChih-hung Hsieh <chh@google.com>2018-09-17 16:50:11 +0000
commit502f4864d6c92fce4cb0e4f7f2b12d7124da902b (patch)
treeb34cb377a8a6543fb0baf68e566b120209b3aaf9 /base/include/android-base/macros.h
parentc2501fda600ea2067099c1de042e3db7acde74ee (diff)
Suppress implicit-fallthrough warnings.
Add FALLTHROUGH_INTENDED for clang compiler. Bug: 112564944 Test: build with global -Wimplicit-fallthrough. Change-Id: I40f8bbf94e207c9dd90921e9b762ba51abab5777
Diffstat (limited to 'base/include/android-base/macros.h')
-rw-r--r--base/include/android-base/macros.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/base/include/android-base/macros.h b/base/include/android-base/macros.h
index 49cc0c980..174866570 100644
--- a/base/include/android-base/macros.h
+++ b/base/include/android-base/macros.h
@@ -170,7 +170,9 @@ void UNUSED(const T&...) {
//
// In either case this macro has no effect on runtime behavior and performance
// of code.
+#ifndef FALLTHROUGH_INTENDED
#define FALLTHROUGH_INTENDED [[clang::fallthrough]] // NOLINT
+#endif
// Current ABI string
#if defined(__arm__)