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

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

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]