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.
This commit is contained in:
Eric Blake 2011-11-04 16:32:30 -06:00
parent 9d86cbcf5f
commit 4d970fd293

View File

@ -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
}