
On 12/03/2010 10:48 AM, Justin Clift wrote:
event.c: In function 'virEventInterruptLocked': event.c:656: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
VIR_DEBUG("Skip interrupt, %d %d", eventLoop.running, (int)eventLoop.leader.thread); return 0; }
Like 656 is the VIR_DEBUG() line.
Having trouble finding where eventLoop.leader.thread is defined though. Probably because I'm more sleepy than optimal. Thinking it might be some kind of problem with OSX and gnulib?
Rather, it's due to the fact that pthread_t is allowed to be a pointer type, and on 64-bit systems, a pthread_t pointer is truncated when cast to int (it just happens that pthread_t is an integer rather than a pointer on glibc, so we don't notice this on Linux). But we already have virThreadSelfID which works around this issue for the current thread; all we need to do is extend it to other threads. Patch coming up soon! -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org