[libvirt] [PATCH] cgroup -Werror fix

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

 



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,

--
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]