summaryrefslogtreecommitdiff
path: root/tools/aapt/StringPool.cpp
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2016-05-19 15:19:22 -0700
committerChih-Hung Hsieh <chh@google.com>2016-05-19 15:19:22 -0700
commite819d01e3e120844e95cc4c534382d20d2beb623 (patch)
treed2d192e309391e5c132f7be7de4a472bb290e44e /tools/aapt/StringPool.cpp
parent4bc3d32b15cdcae7685722e7a20007c7aa9ae949 (diff)
Fix misc-macro-parentheses warnings in aapt and androidfw.
Bug: 28705665 Change-Id: Iac353e66718aadad384183cf300330695df25909
Diffstat (limited to 'tools/aapt/StringPool.cpp')
-rw-r--r--tools/aapt/StringPool.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/aapt/StringPool.cpp b/tools/aapt/StringPool.cpp
index 9908c44c6d1f..37a493329ade 100644
--- a/tools/aapt/StringPool.cpp
+++ b/tools/aapt/StringPool.cpp
@@ -390,12 +390,12 @@ sp<AaptFile> StringPool::createStringBlock()
#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)