From: Eric Blake Date: Fri, 4 Nov 2011 22:32:30 +0000 (-0600) Subject: build: silence compiler warning on BSD X-Git-Tag: v0.9.7~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d970fd29;p=thirdparty%2Flibvirt.git 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. --- 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 }