bug-gnulib
[Top][All Lists]
Advanced

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

Re: [libvirt] [PATCH 03/13] Rewrite virAtomic APIs using GLib's atomic o


From: Eric Blake
Subject: Re: [libvirt] [PATCH 03/13] Rewrite virAtomic APIs using GLib's atomic ops code
Date: Fri, 20 Jul 2012 16:31:20 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

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   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]