Fix misc-macro-parentheses warnings in aapt and androidfw.
Bug: 28705665
Change-Id: Iac353e66718aadad384183cf300330695df25909
diff --git a/tools/aapt/StringPool.cpp b/tools/aapt/StringPool.cpp
index 9908c44..37a4933 100644
--- a/tools/aapt/StringPool.cpp
+++ b/tools/aapt/StringPool.cpp
@@ -390,12 +390,12 @@
#define ENCODE_LENGTH(str, chrsz, strSize) \
{ \
- size_t maxMask = 1 << ((chrsz*8)-1); \
+ size_t maxMask = 1 << (((chrsz)*8)-1); \
size_t maxSize = maxMask-1; \
- if (strSize > maxSize) { \
- *str++ = maxMask | ((strSize>>(chrsz*8))&maxSize); \
+ if ((strSize) > maxSize) { \
+ *(str)++ = maxMask | (((strSize)>>((chrsz)*8))&maxSize); \
} \
- *str++ = strSize; \
+ *(str)++ = strSize; \
}
status_t StringPool::writeStringBlock(const sp<AaptFile>& pool)