summaryrefslogtreecommitdiffstats
path: root/tests/main.c
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-22 15:50:27 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-22 15:50:27 +0200
commitea9457699ba1eb2b01521bd2aecb15fa3488a633 (patch)
treea5631b9eef3d6b4e3bf9c01f5da819ff91424ca3 /tests/main.c
parente2e13629a7285fcaa84c52971315e6564dc19ef8 (diff)
downloadedoors-ea9457699ba1eb2b01521bd2aecb15fa3488a633.zip
edoors-ea9457699ba1eb2b01521bd2aecb15fa3488a633.tar.gz
PRINTPTR macro replace pointer cast to unsigned int
Diffstat (limited to 'tests/main.c')
-rw-r--r--tests/main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/main.c b/tests/main.c
index c6acde8..ca79301 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -3,6 +3,13 @@
#include <eina_log.h>
#include <stdio.h>
+#undef PRINTPTR
+#ifdef __clang__
+# define PRINTPTR(_p) (unsigned int)_p
+#else
+# define PRINTPTR(_p) (_p)
+#endif
+
typedef struct {
char txt[32];
int idx;
@@ -30,7 +37,7 @@ static void input_show(Input *input)
static void input_receive(const Eiotas_Door *door, Eiotas_Particle *particle, Eiotas_User_Data *data)
{
- EINA_LOG_DOM_DBG(_eiotas_log_dom,"input_receive 0x%X\n",(unsigned int)data);
+ EINA_LOG_DOM_DBG(_eiotas_log_dom,"input_receive 0x%X\n",PRINTPTR(data));
}
int main(int argc, char **argv)