[libvirt] [PATCH] cgroup -Werror fix

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,

On Thu, Oct 08, 2009 at 09:49:45AM -0400, Cole Robinson wrote:
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.
ACK, this is fine Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (2)
-
Cole Robinson
-
Daniel P. Berrange