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

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

 



On 04/12/2010, at 4:16 AM, Diego Elio Pettenò wrote:
> Il giorno sab, 04/12/2010 alle 04.08 +1100, Justin Clift ha scritto:
>> 
>> 
>>  ../daemon/event.c: In function 'virEventInterruptLocked':
>>  ../daemon/event.c:656: warning: cast from pointer to integer of
>> different size [-Wpointer-to-int-cast]
>> 
>>  event.c: In function 'virEventInterruptLocked':
>>  event.c:656: warning: cast from pointer to integer of different size
>> [-Wpointer-to-int-cast]
>> 
> These two should be considered _more_ than simply warnings, they can
> abort the software at runtime if used on 64-bit systems, so I'd suggest
> tackling these _sooner_ than the shadows (I don't have compile-access to
> my mac right now, or I'd be sending something myself).

Thanks.  They're from this piece of code:

    if (!eventLoop.running ||
        virThreadIsSelf(&eventLoop.leader)) {
        VIR_DEBUG("Skip interrupt, %d %d", eventLoop.running, (int)eventLoop.leader.thread);
        return 0;
    }

Like 656 is the VIR_DEBUG() line.

The eventLoop.running is defined earlier in the file as:

    int running;

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?

Tracing things back manually shows this in the OSX provided /usr/include/pthread.h:

  #ifndef _PTHREAD_T
  #define _PTHREAD_T
  typedef __darwin_pthread_t              pthread_t;
  #endif

And this in the gnulib version, gnulib/lib/pthread.h:

 typedef int pthread_t;

Any idea if this on the right track, or am I just confusing myself? :)




--
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]