Merge "Fix misc-macro-parentheses warnings in libion, libsparse, libmem*"
This commit is contained in:
commit
3e3741aa7f
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 */
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT)
|
#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT)
|
||||||
#define ION_HEAP_TYPE_DMA_MASK (1 << ION_HEAP_TYPE_DMA)
|
#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
|
#define ION_FLAG_CACHED 1
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#define ION_FLAG_CACHED_NEEDS_SYNC 2
|
#define ION_FLAG_CACHED_NEEDS_SYNC 2
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <hardware/memtrack.h>
|
#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;
|
static const memtrack_module_t *module;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,10 @@ class LeakFoldingTest : public ::testing::Test {
|
||||||
Heap heap_;
|
Heap heap_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define buffer_begin(buffer) reinterpret_cast<uintptr_t>(&buffer[0])
|
#define buffer_begin(buffer) reinterpret_cast<uintptr_t>(&(buffer)[0])
|
||||||
#define buffer_end(buffer) (reinterpret_cast<uintptr_t>(&buffer[0]) + sizeof(buffer))
|
#define buffer_end(buffer) (reinterpret_cast<uintptr_t>(&(buffer)[0]) + sizeof(buffer))
|
||||||
#define ALLOCATION(heap_walker, 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) {
|
TEST_F(LeakFoldingTest, one) {
|
||||||
void* buffer1[1] = {nullptr};
|
void* buffer1[1] = {nullptr};
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
#define CHUNK_HEADER_LEN (sizeof(chunk_header_t))
|
#define CHUNK_HEADER_LEN (sizeof(chunk_header_t))
|
||||||
|
|
||||||
#define container_of(inner, outer_t, elem) \
|
#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 {
|
struct output_file_ops {
|
||||||
int (*open)(struct output_file *, int fd);
|
int (*open)(struct output_file *, int fd);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue