]> xenbits.xensource.com Git - libvirt.git/commit
build: silence false positive clang report
authorEric Blake <eblake@redhat.com>
Mon, 14 Feb 2011 21:23:11 +0000 (14:23 -0700)
committerEric Blake <eblake@redhat.com>
Mon, 14 Feb 2011 22:37:32 +0000 (15:37 -0700)
commitbd6ea30384490a0847ec981877ae781a9cf62890
tree3f19e4c28b62508a9541f4a2ce0a724e84fb0206
parente046d41f728c1fbc072de5cafb253de4a42efd35
build: silence false positive clang report

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.
src/util/cgroup.c