verify usage [was: [libvirt] [PATCH 03/13] Rewrite virAtomic APIs using GLib's atomic ops code]

2012-07-20 Thread Eric Blake
On 07/19/2012 08:15 AM, Eric Blake wrote: > > 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. > I'm pushing this documentation aid, so that the next time this question comes up, we have something to poin

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

2012-07-20 Thread Eric Blake
On 07/20/2012 04:26 PM, Eric Blake wrote: > +# define virAtomicIntGet(atomic) \ > +(__extension__ ({ \ > +verify (sizeof(*(atomic)) == sizeof(int)); \ > within func

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

2012-07-20 Thread Eric Blake
On 07/20/2012 12:36 AM, Hu Tao wrote: +# define virAtomicIntGet(atomic) \ +(__extension__ ({ \ +verify (sizeof(*(atomic)) == sizeof(int)); \ +(v

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

2012-07-20 Thread Eric Blake
On 07/20/2012 12:36 AM, Hu Tao wrote: >>> 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] >> >> W

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

2012-07-20 Thread Hu Tao
On Thu, Jul 19, 2012 at 08:15:28AM -0600, Eric Blake wrote: > On 07/18/2012 07:07 PM, Hu Tao wrote: > > <...> > > > >> + > >> +# define virAtomicIntGet(atomic) \ > >> +(__extension__ ({ \ > >> +

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

2012-07-19 Thread Eric Blake
On 07/18/2012 07:07 PM, Hu Tao wrote: > <...> > >> + >> +# define virAtomicIntGet(atomic) \ >> +(__extension__ ({ \ >> +verify (sizeof(*(atomic)) == sizeof(int)); \ >> +