From 80f9b05553088af08fd9dbffc4db8b76f804cc13 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Sun, 20 Oct 2013 11:53:54 +0200 Subject: [PATCH] android: Improve cutils/log.h stubs Provide dummy function that will use ALOG* macros parameters. This fix build errors about set-but-not-used used local variables on linux. --- android/cutils/log.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/android/cutils/log.h b/android/cutils/log.h index d87da72f0..389542b18 100644 --- a/android/cutils/log.h +++ b/android/cutils/log.h @@ -17,11 +17,13 @@ #ifndef _CUTILS_LOG_H #define _CUTILS_LOG_H -#define ALOGV(...) -#define ALOGD(...) -#define ALOGI(...) -#define ALOGW(...) -#define ALOGE(...) +static inline void ALOG() {}; + +#define ALOGV(...) ALOG("V", __VA_ARGS__) +#define ALOGD(...) ALOG("D", __VA_ARGS__) +#define ALOGI(...) ALOG("I", __VA_ARGS__) +#define ALOGW(...) ALOG("W", __VA_ARGS__) +#define ALOGE(...) ALOG("E", __VA_ARGS__) #define LOG_ALWAYS_FATAL(...) do { ALOGE(__VA_ARGS__); exit(1); } while (0) #endif // _CUTILS_LOG_H -- 2.47.3