Cast _dispatch_thread_self() to (void *) before printing as a pointer, as thread IDs are not pointers on all platforms. It's not clear exactly what format string should be used to print a thread ID, but %p continues seems to remain a reasonable way forward. Submitted by: Paolo Bonzini <bonzini@gnu.org>
--- trunk/src/internal.h 2009-10-28 09:02:48 UTC (rev 63)
+++ trunk/src/internal.h 2009-10-28 09:21:08 UTC (rev 64)
@@ -229,7 +229,8 @@
#define _dispatch_debug(x, args...) \
({ \
if (DISPATCH_DEBUG) { \
- _dispatch_log("libdispatch: %u\t%p\t" x, __LINE__, _dispatch_thread_self(), ##args); \
+ _dispatch_log("libdispatch: %u\t%p\t" x, __LINE__, \
+ (void *)_dispatch_thread_self(), ##args); \
} \
})