summaryrefslogtreecommitdiffstats
path: root/liblog
diff options
context:
space:
mode:
authorKrzysztof Wesolowski2017-11-30 03:11:13 -0600
committerBryan Eyler2018-01-11 13:11:20 -0600
commitb0e17c9e91bd51a129933e46ef1b68e57bb4b5f3 (patch)
tree7a0b738df8a34e847d16ceb26bbe253749da6af3 /liblog
parent4d281880e0f6f8644c530e5274f999bebc19d65c (diff)
downloadplatform-system-core-b0e17c9e91bd51a129933e46ef1b68e57bb4b5f3.tar.gz
platform-system-core-b0e17c9e91bd51a129933e46ef1b68e57bb4b5f3.tar.xz
platform-system-core-b0e17c9e91bd51a129933e46ef1b68e57bb4b5f3.zip
Improve ALOGV compatiblity with clang-tidy
Currently used clang tidy does not filter the warnings caused by macros, even if macros come from filtered headers. This change allows projects using ALOGV to use readability-implicit-bool-conversion without spreading //NOLINT everywhere. Bug: 71533509 Change-Id: Id1b193d1e56d13f00171e04f600292877c5f6cb3
Diffstat (limited to 'liblog')
-rw-r--r--liblog/include/log/log_main.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/liblog/include/log/log_main.h b/liblog/include/log/log_main.h
index 339a06d86..21fc7cca0 100644
--- a/liblog/include/log/log_main.h
+++ b/liblog/include/log/log_main.h
@@ -17,6 +17,8 @@
17#ifndef _LIBS_LOG_LOG_MAIN_H 17#ifndef _LIBS_LOG_LOG_MAIN_H
18#define _LIBS_LOG_LOG_MAIN_H 18#define _LIBS_LOG_LOG_MAIN_H
19 19
20#include <stdbool.h>
21
20#include <android/log.h> 22#include <android/log.h>
21#include <sys/cdefs.h> 23#include <sys/cdefs.h>
22 24
@@ -175,10 +177,10 @@ __BEGIN_DECLS
175#if LOG_NDEBUG 177#if LOG_NDEBUG
176#define ALOGV(...) \ 178#define ALOGV(...) \
177 do { \ 179 do { \
178 if (0) { \ 180 if (false) { \
179 __ALOGV(__VA_ARGS__); \ 181 __ALOGV(__VA_ARGS__); \
180 } \ 182 } \
181 } while (0) 183 } while (false)
182#else 184#else
183#define ALOGV(...) __ALOGV(__VA_ARGS__) 185#define ALOGV(...) __ALOGV(__VA_ARGS__)
184#endif 186#endif