diff options
author | Chih-Hung Hsieh | 2016-05-18 17:41:16 -0500 |
---|---|---|
committer | Chih-Hung Hsieh | 2016-05-18 17:41:16 -0500 |
commit | eabd5108b310c7dcc773285a15de5cd62b16575e (patch) | |
tree | 24f17d7cbfb0911bc311321efe9ec2b99ee62120 | |
parent | 9b0eb7cdf4ac4650fc3f476c2f5a91c50a18e524 (diff) | |
download | platform-system-core-eabd5108b310c7dcc773285a15de5cd62b16575e.tar.gz platform-system-core-eabd5108b310c7dcc773285a15de5cd62b16575e.tar.xz platform-system-core-eabd5108b310c7dcc773285a15de5cd62b16575e.zip |
Fix misc-macro-parentheses warnings in libion, libsparse, libmem*
Bug: 28705665
Change-Id: I3dd5c086787f5e48ab100a71a42109ea0e417bf9
-rw-r--r-- | libion/kernel-headers/linux/ion.h | 2 | ||||
-rw-r--r-- | libmemtrack/memtrack.c | 2 | ||||
-rw-r--r-- | libmemunreachable/tests/LeakFolding_test.cpp | 6 | ||||
-rw-r--r-- | libsparse/output_file.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/libion/kernel-headers/linux/ion.h b/libion/kernel-headers/linux/ion.h index 5af39d04f..3c2808036 100644 --- a/libion/kernel-headers/linux/ion.h +++ b/libion/kernel-headers/linux/ion.h | |||
@@ -38,7 +38,7 @@ enum ion_heap_type { | |||
38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
39 | #define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT) | 39 | #define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT) |
40 | #define ION_HEAP_TYPE_DMA_MASK (1 << ION_HEAP_TYPE_DMA) | 40 | #define ION_HEAP_TYPE_DMA_MASK (1 << ION_HEAP_TYPE_DMA) |
41 | #define ION_NUM_HEAP_IDS sizeof(unsigned int) * 8 | 41 | #define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8) |
42 | #define ION_FLAG_CACHED 1 | 42 | #define ION_FLAG_CACHED 1 |
43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
44 | #define ION_FLAG_CACHED_NEEDS_SYNC 2 | 44 | #define ION_FLAG_CACHED_NEEDS_SYNC 2 |
diff --git a/libmemtrack/memtrack.c b/libmemtrack/memtrack.c index 21d9ebdb9..b52821438 100644 --- a/libmemtrack/memtrack.c +++ b/libmemtrack/memtrack.c | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #include <hardware/memtrack.h> | 27 | #include <hardware/memtrack.h> |
28 | 28 | ||
29 | #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) | 29 | #define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0])) |
30 | 30 | ||
31 | static const memtrack_module_t *module; | 31 | static const memtrack_module_t *module; |
32 | 32 | ||
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 { | |||
37 | Heap heap_; | 37 | Heap heap_; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | #define buffer_begin(buffer) reinterpret_cast<uintptr_t>(&buffer[0]) | 40 | #define buffer_begin(buffer) reinterpret_cast<uintptr_t>(&(buffer)[0]) |
41 | #define buffer_end(buffer) (reinterpret_cast<uintptr_t>(&buffer[0]) + sizeof(buffer)) | 41 | #define buffer_end(buffer) (reinterpret_cast<uintptr_t>(&(buffer)[0]) + sizeof(buffer)) |
42 | #define ALLOCATION(heap_walker, buffer) \ | 42 | #define ALLOCATION(heap_walker, buffer) \ |
43 | ASSERT_EQ(true, heap_walker.Allocation(buffer_begin(buffer), buffer_end(buffer))) | 43 | ASSERT_EQ(true, (heap_walker).Allocation(buffer_begin(buffer), buffer_end(buffer))) |
44 | 44 | ||
45 | TEST_F(LeakFoldingTest, one) { | 45 | TEST_F(LeakFoldingTest, one) { |
46 | void* buffer1[1] = {nullptr}; | 46 | void* buffer1[1] = {nullptr}; |
diff --git a/libsparse/output_file.c b/libsparse/output_file.c index cd3080038..d2847367a 100644 --- a/libsparse/output_file.c +++ b/libsparse/output_file.c | |||
@@ -57,7 +57,7 @@ | |||
57 | #define CHUNK_HEADER_LEN (sizeof(chunk_header_t)) | 57 | #define CHUNK_HEADER_LEN (sizeof(chunk_header_t)) |
58 | 58 | ||
59 | #define container_of(inner, outer_t, elem) \ | 59 | #define container_of(inner, outer_t, elem) \ |
60 | ((outer_t *)((char *)inner - offsetof(outer_t, elem))) | 60 | ((outer_t *)((char *)(inner) - offsetof(outer_t, elem))) |
61 | 61 | ||
62 | struct output_file_ops { | 62 | struct output_file_ops { |
63 | int (*open)(struct output_file *, int fd); | 63 | int (*open)(struct output_file *, int fd); |