summaryrefslogtreecommitdiff
path: root/runtime/base/logging.h
diff options
context:
space:
mode:
author Chih-Hung Hsieh <chh@google.com> 2016-05-11 11:26:48 -0700
committer Chih-Hung Hsieh <chh@google.com> 2016-05-13 10:38:56 -0700
commitfba39972d99701c80bf3beb7451aca508d67593c (patch)
tree0d80ecb6997290140503926b08a72e7418915526 /runtime/base/logging.h
parent718d4e269810c17d03df909c84b2f7bbd4f61fb9 (diff)
Fix misc-macro-parentheses warnings.
* Add parentheses to fix warnings. * Use NOLINT to suppress wrong clang-tidy warnings. Bug: 28705665 Change-Id: Icc8bc9b59583dee0ea17ab83e0ff0383b8599c3e
Diffstat (limited to 'runtime/base/logging.h')
-rw-r--r--runtime/base/logging.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/base/logging.h b/runtime/base/logging.h
index 3b5b8b54a5..41a1aee6d1 100644
--- a/runtime/base/logging.h
+++ b/runtime/base/logging.h
@@ -140,11 +140,11 @@ extern const char* ProgramInvocationShortName();
// Helper for CHECK_STRxx(s1,s2) macros.
#define CHECK_STROP(s1, s2, sense) \
- if (UNLIKELY((strcmp(s1, s2) == 0) != sense)) \
+ if (UNLIKELY((strcmp(s1, s2) == 0) != (sense))) \
LOG(::art::FATAL) << "Check failed: " \
- << "\"" << s1 << "\"" \
- << (sense ? " == " : " != ") \
- << "\"" << s2 << "\""
+ << "\"" << (s1) << "\"" \
+ << ((sense) ? " == " : " != ") \
+ << "\"" << (s2) << "\""
// Check for string (const char*) equality between s1 and s2, LOG(FATAL) if not.
#define CHECK_STREQ(s1, s2) CHECK_STROP(s1, s2, true)
@@ -156,7 +156,7 @@ extern const char* ProgramInvocationShortName();
int rc = call args; \
if (rc != 0) { \
errno = rc; \
- PLOG(::art::FATAL) << # call << " failed for " << what; \
+ PLOG(::art::FATAL) << # call << " failed for " << (what); \
} \
} while (false)