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

Re: [libvirt] [PATCH] build: allow virObject to have no parent



On 01/22/2013 10:23 AM, Daniel P. Berrange wrote:
> On Tue, Jan 22, 2013 at 10:15:20AM -0700, Eric Blake wrote:
>> When building with static analysis enabled, we turn on attribute
>> nonnull checking.  However, this caused the build to fail with:
>>
>> ../../src/util/virobject.c: In function 'virObjectOnceInit':
>> ../../src/util/virobject.c:55:40: error: null argument where non-null required (argument 1) [-Werror=nonnull]
>>
>> Creation of the virObject class is the one instance where the
>> parent class is allowed to be NULL, so making things conditional
>> will let us keep static analysis checking for all other callers,
>> without breaking the build on the one exception.
>>
>> * src/util/virobject.c: Define witness.
>> * src/util/virobject.h (virClassNew): Use it to force most callers
>> to pass non-null parameter.
>> ---
>>

> ACK

Thanks; pushed.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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