]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: silence compiler warning on BSD
authorEric Blake <eblake@redhat.com>
Fri, 4 Nov 2011 22:32:30 +0000 (16:32 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 4 Nov 2011 22:43:37 +0000 (16:43 -0600)
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

index 82ce5c6ee8bde44c994bf20e80d9ba5680f5467a..5b8fd5b9ef9cad1c5e77706160b81681cb966b3e 100644 (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
 }