Suppress gnu-zero-variadic-macro-arguments warning.
Bug: 111614304 Test: make with WITH_TIDY=1 Change-Id: I2a52073202f42d1912363ae864f2f7f892589cea
This commit is contained in:
parent
46f281edf5
commit
cd3965e425
|
@ -40,19 +40,6 @@ __BEGIN_DECLS
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Use __VA_ARGS__ if running a static analyzer,
|
||||
* to avoid warnings of unused variables in __VA_ARGS__.
|
||||
* __FAKE_USE_VA_ARGS is undefined at link time,
|
||||
* so don't link with __clang_analyzer__ defined.
|
||||
*/
|
||||
#ifdef __clang_analyzer__
|
||||
extern void __fake_use_va_args(int, ...);
|
||||
#define __FAKE_USE_VA_ARGS(...) __fake_use_va_args(0, ##__VA_ARGS__)
|
||||
#else
|
||||
#define __FAKE_USE_VA_ARGS(...) ((void)(0))
|
||||
#endif
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
|
@ -66,6 +53,19 @@ extern void __fake_use_va_args(int, ...);
|
|||
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Use __VA_ARGS__ if running a static analyzer,
|
||||
* to avoid warnings of unused variables in __VA_ARGS__.
|
||||
* __FAKE_USE_VA_ARGS is undefined at link time,
|
||||
* so don't link with __clang_analyzer__ defined.
|
||||
*/
|
||||
#ifdef __clang_analyzer__
|
||||
extern void __fake_use_va_args(int, ...);
|
||||
#define __FAKE_USE_VA_ARGS(...) __fake_use_va_args(0, ##__VA_ARGS__)
|
||||
#else
|
||||
#define __FAKE_USE_VA_ARGS(...) ((void)(0))
|
||||
#endif
|
||||
|
||||
#ifndef __predict_false
|
||||
#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue