summaryrefslogtreecommitdiffstats
path: root/libutils/RefBase.cpp
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2017-10-02 15:20:07 -0700
committerChih-Hung Hsieh <chh@google.com>2017-11-01 11:32:55 -0700
commit122352d983805b8ded5f8f3c07e75844244aba40 (patch)
tree2512a37968404bd39265da943bee33e33e064744 /libutils/RefBase.cpp
parent15251c24b9cbb809aad74d8e5796f0eb6d83d8bb (diff)
downloadcore-122352d983805b8ded5f8f3c07e75844244aba40.tar.gz
core-122352d983805b8ded5f8f3c07e75844244aba40.tar.bz2
core-122352d983805b8ded5f8f3c07e75844244aba40.zip
Use -Werror in system/core
* Move -Wall -Werror from cppflags to cflags. * Fix/suppress warning on unused variables. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: I1e05e96a1d0bcb2ccef1ce456504b3af57167cc5
Diffstat (limited to 'libutils/RefBase.cpp')
-rw-r--r--libutils/RefBase.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/libutils/RefBase.cpp b/libutils/RefBase.cpp
index f5f881fcc..8bccb0f5c 100644
--- a/libutils/RefBase.cpp
+++ b/libutils/RefBase.cpp
@@ -410,8 +410,7 @@ void RefBase::incStrong(const void* id) const
return;
}
- int32_t old = refs->mStrong.fetch_sub(INITIAL_STRONG_VALUE,
- std::memory_order_relaxed);
+ int32_t old __unused = refs->mStrong.fetch_sub(INITIAL_STRONG_VALUE, std::memory_order_relaxed);
// A decStrong() must still happen after us.
ALOG_ASSERT(old > INITIAL_STRONG_VALUE, "0x%x too small", old);
refs->mBase->onFirstRef();