From: Szymon Janc <szymon.janc@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Szymon Janc <szymon.janc@tieto.com>
Subject: [PATCH 1/5] android: Fix cutils/log.h stubs
Date: Sat, 19 Oct 2013 01:01:38 +0200 [thread overview]
Message-ID: <1382137302-17237-2-git-send-email-szymon.janc@gmail.com> (raw)
In-Reply-To: <1382137302-17237-1-git-send-email-szymon.janc@gmail.com>
From: Szymon Janc <szymon.janc@tieto.com>
Provide dummy functions that will use macro 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 d87da72..7374add 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 dummy_printf(const char *fmt, ...) { }
+
+#define ALOGV(...) dummy_printf("", __VA_ARGS__)
+#define ALOGD(...) dummy_printf("", __VA_ARGS__)
+#define ALOGI(...) dummy_printf("", __VA_ARGS__)
+#define ALOGW(...) dummy_printf("", __VA_ARGS__)
+#define ALOGE(...) dummy_printf("", __VA_ARGS__)
#define LOG_ALWAYS_FATAL(...) do { ALOGE(__VA_ARGS__); exit(1); } while (0)
#endif // _CUTILS_LOG_H
--
1.8.4.rc3
next prev parent reply other threads:[~2013-10-18 23:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-18 23:01 [PATCH 0/5] Initial Android IPC Szymon Janc
2013-10-18 23:01 ` Szymon Janc [this message]
2013-10-18 23:01 ` [PATCH 2/5] android: Define path for HAL communication socket Szymon Janc
2013-10-18 23:01 ` [PATCH 3/5] android: Connect daemon to HAL library Szymon Janc
2013-10-18 23:01 ` [PATCH 4/5] android: Make HAL library wait for daemon to connect on init Szymon Janc
2013-10-18 23:01 ` [PATCH 5/5] android: Remove not needed property_get function form cutils stubs Szymon Janc
2013-10-19 13:28 ` [PATCH 0/5] Initial Android IPC Szymon Janc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382137302-17237-2-git-send-email-szymon.janc@gmail.com \
--to=szymon.janc@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=szymon.janc@tieto.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox