[libvirt] [PATCH] build: silence false positive clang report
Eric Blake
eblake at redhat.com
Mon Feb 14 22:40:44 UTC 2011
On 02/14/2011 02:57 PM, Laine Stump wrote:
> On 02/14/2011 04:37 PM, Eric Blake wrote:
>> clang complained that STREQ(group->controllers[i].mountPoint,...) was
>> a NULL dereference when i==VIR_CGROUP_CONTROLLER_CPUSET, because it
>> assumes the worst about virCgroupPathOfController. Marking the
>> argument const doesn't yet have an effect, per this clang bug:
>> http://llvm.org/bugs/show_bug.cgi?id=7758
>>
>> So, we use sa_assert, which was designed to shut up false positives
>> from tools like clang.
>>
>> * src/util/cgroup.c (virCgroupMakeGroup): Teach clang that there
>> is no NULL dereference.
>> + /* As of Feb 2011, clang can't see that the above function
>> + * call did not modify group. */
>> + sa_assert(group->controllers[i].mountPoint);
>>
>
> ACK.
Thanks; pushed.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110214/76ef4d52/attachment-0001.sig>
More information about the libvir-list
mailing list