Fix misc-macro-parentheses warnings in libion, libsparse, libmem*

Bug: 28705665
Change-Id: I3dd5c086787f5e48ab100a71a42109ea0e417bf9
This commit is contained in:
Chih-Hung Hsieh 2016-05-18 15:41:16 -07:00
parent 9b0eb7cdf4
commit eabd5108b3
4 changed files with 6 additions and 6 deletions

View file

@ -38,7 +38,7 @@ enum ion_heap_type {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT)
#define ION_HEAP_TYPE_DMA_MASK (1 << ION_HEAP_TYPE_DMA)
#define ION_NUM_HEAP_IDS sizeof(unsigned int) * 8
#define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8)
#define ION_FLAG_CACHED 1
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_FLAG_CACHED_NEEDS_SYNC 2

View file

@ -26,7 +26,7 @@
#include <hardware/memtrack.h>
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
static const memtrack_module_t *module;

View file

@ -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};

View file

@ -57,7 +57,7 @@
#define CHUNK_HEADER_LEN (sizeof(chunk_header_t))
#define container_of(inner, outer_t, elem) \
((outer_t *)((char *)inner - offsetof(outer_t, elem)))
((outer_t *)((char *)(inner) - offsetof(outer_t, elem)))
struct output_file_ops {
int (*open)(struct output_file *, int fd);