summaryrefslogtreecommitdiffstats
path: root/libmemunreachable
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2016-05-18 15:41:16 -0700
committerChih-Hung Hsieh <chh@google.com>2016-05-18 15:41:16 -0700
commiteabd5108b310c7dcc773285a15de5cd62b16575e (patch)
tree24f17d7cbfb0911bc311321efe9ec2b99ee62120 /libmemunreachable
parent9b0eb7cdf4ac4650fc3f476c2f5a91c50a18e524 (diff)
downloadcore-eabd5108b310c7dcc773285a15de5cd62b16575e.tar.gz
core-eabd5108b310c7dcc773285a15de5cd62b16575e.tar.bz2
core-eabd5108b310c7dcc773285a15de5cd62b16575e.zip
Fix misc-macro-parentheses warnings in libion, libsparse, libmem*
Bug: 28705665 Change-Id: I3dd5c086787f5e48ab100a71a42109ea0e417bf9
Diffstat (limited to 'libmemunreachable')
-rw-r--r--libmemunreachable/tests/LeakFolding_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libmemunreachable/tests/LeakFolding_test.cpp b/libmemunreachable/tests/LeakFolding_test.cpp
index 879a3a023..e85df5f58 100644
--- a/libmemunreachable/tests/LeakFolding_test.cpp
+++ b/libmemunreachable/tests/LeakFolding_test.cpp
@@ -37,10 +37,10 @@ class LeakFoldingTest : public ::testing::Test {
Heap heap_;
};
-#define buffer_begin(buffer) reinterpret_cast<uintptr_t>(&buffer[0])
-#define buffer_end(buffer) (reinterpret_cast<uintptr_t>(&buffer[0]) + sizeof(buffer))
+#define buffer_begin(buffer) reinterpret_cast<uintptr_t>(&(buffer)[0])
+#define buffer_end(buffer) (reinterpret_cast<uintptr_t>(&(buffer)[0]) + sizeof(buffer))
#define ALLOCATION(heap_walker, buffer) \
- ASSERT_EQ(true, heap_walker.Allocation(buffer_begin(buffer), buffer_end(buffer)))
+ ASSERT_EQ(true, (heap_walker).Allocation(buffer_begin(buffer), buffer_end(buffer)))
TEST_F(LeakFoldingTest, one) {
void* buffer1[1] = {nullptr};