Re: [libvirt] [PATCH] build: make ATTRIBUTE_NONNULL() a NOP unless STATIC_ANALYSIS is on

2012-05-01 Thread Laine Stump
On 04/26/2012 08:57 AM, Eric Blake wrote: > On 04/26/2012 12:56 AM, Laine Stump wrote: >> The ATTRIBUTE_NONNULL(m) macro normally resolves to the gcc builtin >> __attribute__((__nonnull__(m))). The effect of this in gcc is >> unfortunately only to make gcc believe that "m" can never possibly be >>

Re: [libvirt] [PATCH] build: make ATTRIBUTE_NONNULL() a NOP unless STATIC_ANALYSIS is on

2012-04-26 Thread Eric Blake
On 04/26/2012 12:56 AM, Laine Stump wrote: > The ATTRIBUTE_NONNULL(m) macro normally resolves to the gcc builtin > __attribute__((__nonnull__(m))). The effect of this in gcc is > unfortunately only to make gcc believe that "m" can never possibly be > NULL, *not* to add in any checks to guarantee th

[libvirt] [PATCH] build: make ATTRIBUTE_NONNULL() a NOP unless STATIC_ANALYSIS is on

2012-04-26 Thread Laine Stump
The ATTRIBUTE_NONNULL(m) macro normally resolves to the gcc builtin __attribute__((__nonnull__(m))). The effect of this in gcc is unfortunately only to make gcc believe that "m" can never possibly be NULL, *not* to add in any checks to guarantee that it isn't ever NULL (i.e. it is an optimization a