Merge "Change remaining Android logging macros to use C99 varidaic syntax"

This commit is contained in:
Treehugger Robot 2016-04-27 22:39:20 +00:00 committed by Gerrit Code Review
commit 3abd03232e

View file

@ -614,11 +614,11 @@ int android_log_destroy(android_log_context *ctx);
* The stuff in the rest of this file should not be used directly. * The stuff in the rest of this file should not be used directly.
*/ */
#define android_printLog(prio, tag, fmt...) \ #define android_printLog(prio, tag, ...) \
__android_log_print(prio, tag, fmt) __android_log_print(prio, tag, __VA_ARGS__)
#define android_vprintLog(prio, cond, tag, fmt...) \ #define android_vprintLog(prio, cond, tag, ...) \
__android_log_vprint(prio, tag, fmt) __android_log_vprint(prio, tag, __VA_ARGS__)
/* XXX Macros to work around syntax errors in places where format string /* XXX Macros to work around syntax errors in places where format string
* arg is not passed to ALOG_ASSERT, LOG_ALWAYS_FATAL or LOG_ALWAYS_FATAL_IF * arg is not passed to ALOG_ASSERT, LOG_ALWAYS_FATAL or LOG_ALWAYS_FATAL_IF
@ -635,9 +635,9 @@ int android_log_destroy(android_log_context *ctx);
*/ */
#define __android_rest(first, ...) , ## __VA_ARGS__ #define __android_rest(first, ...) , ## __VA_ARGS__
#define android_printAssert(cond, tag, fmt...) \ #define android_printAssert(cond, tag, ...) \
__android_log_assert(cond, tag, \ __android_log_assert(cond, tag, \
__android_second(0, ## fmt, NULL) __android_rest(fmt)) __android_second(0, ## __VA_ARGS__, NULL) __android_rest(__VA_ARGS__))
#define android_writeLog(prio, tag, text) \ #define android_writeLog(prio, tag, text) \
__android_log_write(prio, tag, text) __android_log_write(prio, tag, text)