Re: [PATCH] build: avoid shadowing devname() on BSD systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]