From 4d970fd2938a0558444cddb4f5f5e63b910b5527 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 4 Nov 2011 16:32:30 -0600 Subject: [PATCH] build: silence compiler warning on BSD Building on 64-bit FreeBSD 8.2 complained about a cast between a pointer and a smaller integer. Going through an intermediate cast shuts up the compiler. * src/util/threads-pthread.c (virThreadSelfID): Silence a warning. --- src/util/threads-pthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/threads-pthread.c b/src/util/threads-pthread.c index 82ce5c6ee8..5b8fd5b9ef 100644 --- a/src/util/threads-pthread.c +++ b/src/util/threads-pthread.c @@ -216,7 +216,7 @@ int virThreadSelfID(void) tid = syscall(SYS_gettid); return (int)tid; #else - return (int)(void *)pthread_self(); + return (int)(intptr_t)(void *)pthread_self(); #endif }