Fix misc-macro-parentheses warnings in bionic.
Add parentheses around macro arguments used beside operators,
or use constexpr for simple constants.
Bug: 28705665
Change-Id: I378c8aad92d3ec8e8c4b0440b5c2c99dfe01ce79
diff --git a/linker/dlfcn.cpp b/linker/dlfcn.cpp
index 743b01d..a3ebcd6 100644
--- a/linker/dlfcn.cpp
+++ b/linker/dlfcn.cpp
@@ -176,14 +176,14 @@
{ name_offset, \
reinterpret_cast<Elf32_Addr>(value), \
/* st_size */ 0, \
- (shndx == 0) ? 0 : (STB_GLOBAL << 4), \
+ ((shndx) == 0) ? 0 : (STB_GLOBAL << 4), \
/* st_other */ 0, \
shndx, \
}
#define ELF64_SYM_INITIALIZER(name_offset, value, shndx) \
{ name_offset, \
- (shndx == 0) ? 0 : (STB_GLOBAL << 4), \
+ ((shndx) == 0) ? 0 : (STB_GLOBAL << 4), \
/* st_other */ 0, \
shndx, \
reinterpret_cast<Elf64_Addr>(value), \