Fix misc-macro-parentheses warnings in libion, libsparse, libmem*
Bug: 28705665 Change-Id: I3dd5c086787f5e48ab100a71a42109ea0e417bf9
This commit is contained in:
parent
9b0eb7cdf4
commit
eabd5108b3
4 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue