[libvirt] [PATCH 03/13] Rewrite virAtomic APIs using GLib's atomic ops code
Eric Blake
eblake at redhat.com
Thu Jul 19 14:15:28 UTC 2012
On 07/18/2012 07:07 PM, Hu Tao wrote:
> <...>
>
>> +
>> +# define virAtomicIntGet(atomic) \
>> + (__extension__ ({ \
>> + verify (sizeof(*(atomic)) == sizeof(int)); \
>> + (void) (0 ? *(atomic) ^ *(atomic) : 0); \
>> + __sync_synchronize (); \
>> + (int) *(atomic); \
>> + }))
>
> The `verify' lines cause building warnings:
>
> cc1: warnings being treated as errors
> util/virobject.c: In function 'virClassNew':
> util/virobject.c:74:99: error: nested extern declaration of '_gl_verify_function2' [-Wnested-externs]
Which version of gcc?
I'll have to see if I can come up with a solution in upstream gnulib
that expands verify() in such a way that works with -Wnested-externs.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120719/4d49a191/attachment-0001.sig>
More information about the libvir-list
mailing list