From 502f4864d6c92fce4cb0e4f7f2b12d7124da902b Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Thu, 13 Sep 2018 11:08:41 -0700 Subject: Suppress implicit-fallthrough warnings. Add FALLTHROUGH_INTENDED for clang compiler. Bug: 112564944 Test: build with global -Wimplicit-fallthrough. Change-Id: I40f8bbf94e207c9dd90921e9b762ba51abab5777 --- libutils/RefBase.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libutils/RefBase.cpp') diff --git a/libutils/RefBase.cpp b/libutils/RefBase.cpp index 3f1e79a04..ae107893c 100644 --- a/libutils/RefBase.cpp +++ b/libutils/RefBase.cpp @@ -19,6 +19,8 @@ #include +#include + #include #include @@ -479,7 +481,7 @@ void RefBase::forceIncStrong(const void* id) const case INITIAL_STRONG_VALUE: refs->mStrong.fetch_sub(INITIAL_STRONG_VALUE, std::memory_order_relaxed); - // fall through... + FALLTHROUGH_INTENDED; case 0: refs->mBase->onFirstRef(); } -- cgit v1.2.3