From 6a9f312b62ba85a729085ec689c032a354943fba Mon Sep 17 00:00:00 2001 From: Nils Goroll Date: Wed, 18 Jul 2012 21:01:20 +0200 Subject: [PATCH] portable cast from thread_id to (void *) --- bin/varnishreplay/varnishreplay.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/varnishreplay/varnishreplay.c b/bin/varnishreplay/varnishreplay.c index aec3f5f..e32627a 100644 --- a/bin/varnishreplay/varnishreplay.c +++ b/bin/varnishreplay/varnishreplay.c @@ -182,7 +182,7 @@ thread_log(int lvl, int errcode, const char *fmt, ...) if (lvl > debug) return; pthread_mutex_lock(&log_mutex); - fprintf(stderr, "%p ", (void *)pthread_self()); + fprintf(stderr, "%p ", (void *)(uintptr_t)pthread_self()); va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); @@ -276,7 +276,7 @@ thread_get(int fd, void *(*thread_main)(void *)) } else { threads[fd]->fd = fd; thread_log(0, 0, "thread %p:%d started", - (void *)threads[fd]->thread_id, fd); + (void *)(uintptr_t)threads[fd]->thread_id, fd); } } if (threads[fd] == THREAD_FAIL) @@ -301,7 +301,7 @@ thread_close(int fd) mailbox_close(&threads[fd]->mbox); pthread_join(threads[fd]->thread_id, NULL); thread_log(0, 0, "thread %p stopped", - (void *)threads[fd]->thread_id); + (void *)(uintptr_t)threads[fd]->thread_id); thread_clear(threads[fd]); mailbox_destroy(&threads[fd]->mbox); freez(threads[fd]); -- 1.5.6.5