[libvirt] [PATCH] cgroup -Werror fix

Cole Robinson crobinso at redhat.com
Thu Oct 8 13:49:45 UTC 2009


Building with -Werror, I'm getting this error:

make[3]: *** [libvirt_lxc-cgroup.o] Error 1
make[3]: *** Waiting for unfinished jobs....
cc1: warnings being treated as errors
util/cgroup.c: In function 'virCgroupGetMemoryUsage':
util/cgroup.c:743: error: passing argument 4 of 'virCgroupGetValueU64'
from incompatible pointer type
util/cgroup.c:381: note: expected 'long long unsigned int *' but
argument is of type 'uint64_t *'

Patch below fixes it, though I'm not familiar with the code.

- Cole

diff --git a/src/util/cgroup.c b/src/util/cgroup.c
index 77f19a5..f728a2f 100644
--- a/src/util/cgroup.c
+++ b/src/util/cgroup.c
@@ -736,7 +736,7 @@
  */
 int virCgroupGetMemoryUsage(virCgroupPtr group, unsigned long *kb)
 {
-    uint64_t usage_in_bytes;
+    long long unsigned int usage_in_bytes;
     int ret;
     ret = virCgroupGetValueU64(group,
                                VIR_CGROUP_CONTROLLER_MEMORY,




More information about the libvir-list mailing list