summaryrefslogtreecommitdiffstats
path: root/liblog
diff options
context:
space:
mode:
authorChih-Hung Hsieh2018-07-26 16:29:41 -0500
committerChih-Hung Hsieh2018-07-26 16:33:12 -0500
commitcd3965e425e6a84d085561ed0d80ee0b24d82779 (patch)
treef1c78f31b2958ee626a0cdc221965165bd842903 /liblog
parent46f281edf5e78a51c5c1765460cddcf805e88d48 (diff)
downloadplatform-system-core-cd3965e425e6a84d085561ed0d80ee0b24d82779.tar.gz
platform-system-core-cd3965e425e6a84d085561ed0d80ee0b24d82779.tar.xz
platform-system-core-cd3965e425e6a84d085561ed0d80ee0b24d82779.zip
Suppress gnu-zero-variadic-macro-arguments warning.
Bug: 111614304 Test: make with WITH_TIDY=1 Change-Id: I2a52073202f42d1912363ae864f2f7f892589cea
Diffstat (limited to 'liblog')
-rw-r--r--liblog/include/log/log_main.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/liblog/include/log/log_main.h b/liblog/include/log/log_main.h
index 13143306a..e7b172892 100644
--- a/liblog/include/log/log_main.h
+++ b/liblog/include/log/log_main.h
@@ -40,19 +40,6 @@ __BEGIN_DECLS
40#endif 40#endif
41#endif 41#endif
42 42
43/*
44 * Use __VA_ARGS__ if running a static analyzer,
45 * to avoid warnings of unused variables in __VA_ARGS__.
46 * __FAKE_USE_VA_ARGS is undefined at link time,
47 * so don't link with __clang_analyzer__ defined.
48 */
49#ifdef __clang_analyzer__
50extern void __fake_use_va_args(int, ...);
51#define __FAKE_USE_VA_ARGS(...) __fake_use_va_args(0, ##__VA_ARGS__)
52#else
53#define __FAKE_USE_VA_ARGS(...) ((void)(0))
54#endif
55
56/* --------------------------------------------------------------------- */ 43/* --------------------------------------------------------------------- */
57 44
58/* 45/*
@@ -66,6 +53,19 @@ extern void __fake_use_va_args(int, ...);
66#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" 53#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
67#endif 54#endif
68 55
56/*
57 * Use __VA_ARGS__ if running a static analyzer,
58 * to avoid warnings of unused variables in __VA_ARGS__.
59 * __FAKE_USE_VA_ARGS is undefined at link time,
60 * so don't link with __clang_analyzer__ defined.
61 */
62#ifdef __clang_analyzer__
63extern void __fake_use_va_args(int, ...);
64#define __FAKE_USE_VA_ARGS(...) __fake_use_va_args(0, ##__VA_ARGS__)
65#else
66#define __FAKE_USE_VA_ARGS(...) ((void)(0))
67#endif
68
69#ifndef __predict_false 69#ifndef __predict_false
70#define __predict_false(exp) __builtin_expect((exp) != 0, 0) 70#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
71#endif 71#endif