[libvirt] [PATCH 03/13] Rewrite virAtomic APIs using GLib's atomic ops code
Eric Blake
eblake at redhat.com
Fri Jul 20 22:31:20 UTC 2012
On 07/20/2012 04:26 PM, Eric Blake wrote:
>>>>> +# define virAtomicIntGet(atomic) \
>>>>> + (__extension__ ({ \
>>>>> + verify (sizeof(*(atomic)) == sizeof(int)); \
> within functions, use this instead:
>
> (void)verify_true(...)
Or this, to give a better error message where possible:
(void) verify_expr (sizeof(*(atomic)) == sizeof(int), "wrong size");
>
> The cast to void is unfortunately necessary to avoid a -Wall of
> 'statement with no effect'.
Likewise true of verify_expr().
--
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/20120720/18f31af3/attachment-0001.sig>
More information about the libvir-list
mailing list