Merge "Fix misc-macro-parentheses warnings."

am: d62aa0b1a3

* commit 'd62aa0b1a3d25585946529ed7003ca75a3084109':
  Fix misc-macro-parentheses warnings.

Change-Id: I0bdc69d777044b2119cfc2677c28841b4314efc7
This commit is contained in:
Chih-Hung Hsieh 2016-05-16 16:20:40 +00:00 committed by android-build-merger
commit ebb3dc9ea0

View file

@ -23,7 +23,7 @@
/**
* Initializes an empty, static list.
*/
#define list_init(free_fn) { .head = NULL, .tail = NULL, .freefn = free_fn }
#define list_init(free_fn) { .head = NULL, .tail = NULL, .freefn = (free_fn) }
/**
* given an item in the list, finds the offset for the container
@ -35,7 +35,7 @@
*
*/
#define list_entry(element, type, name) \
(type *)(((uint8_t *)element) - (uint8_t *)&(((type *)NULL)->name))
(type *)(((uint8_t *)(element)) - (uint8_t *)&(((type *)NULL)->name))
/**
* Iterates over the list, do not free elements from the list when using this.
@ -43,7 +43,7 @@
* @var The variable name for the cursor
*/
#define list_for_each(list, var) \
for(var = (list)->head; var != NULL; var = var->next)
for(var = (list)->head; var != NULL; var = var->next) /*NOLINT*/
typedef struct hash_entry hash_entry;