On Mon, Nov 01, 2010 at 10:48:34AM -0600, Eric Blake wrote: > On 11/01/2010 10:35 AM, Daniel P. Berrange wrote: > > On Fri, Oct 29, 2010 at 11:19:50AM -0600, Eric Blake wrote: > >> diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c > >> index 974e96b..614c036 100644 > >> --- a/src/xen/xend_internal.c > >> +++ b/src/xen/xend_internal.c > >> @@ -5770,10 +5770,11 @@ xenDaemonFormatSxpr(virConnectPtr conn, > >> virBufferVSprintf(&buf, "(memory %lu)(maxmem %lu)", > >> def->mem.cur_balloon/1024, def->mem.max_balloon/1024); > >> virBufferVSprintf(&buf, "(vcpus %u)", def->maxvcpus); > >> - /* Computing the vcpu_avail bitmask works because MAX_VIRT_CPUS is 32. */ > >> - verify(MAX_VIRT_CPUS <= sizeof(1U) * CHAR_BIT); > >> + /* Computing the vcpu_avail bitmask works because MAX_VIRT_CPUS is > >> + either 32, or 64 on a platform where long is big enough. */ > >> + verify(MAX_VIRT_CPUS <= sizeof(1UL) * CHAR_BIT); > >> if (def->vcpus < def->maxvcpus) > >> - virBufferVSprintf(&buf, "(vcpu_avail %u)", (1U << def->vcpus) - 1); > >> + virBufferVSprintf(&buf, "(vcpu_avail %lu)", (1UL << def->vcpus) - 1); > >> > >> if (def->cpumask) { > >> char *ranges = virDomainCpuSetFormat(def->cpumask, def->cpumasklen); > > > > This chunk causes a compile error for me > > > > CC libvirt_driver_xen_la-xend_internal.lo > > cc1: warnings being treated as errors > > xen/xend_internal.c: In function 'xenDaemonFormatSxpr': > > xen/xend_internal.c:5775: error: nested extern declaration of 'verify_function2' [-Wnested-externs] > > make[3]: *** [libvirt_driver_xen_la-xend_internal.lo] Error 1 > > Which version of gcc? This may be a bug in gnulib's verify module. I > tested successfully on F13, gcc 4.4.4. It fails on F12 gcc-4.4.3-4.fc12.x86_64, and on F 14 gcc-4.5.0-4.fc14.x86_64 Making it use verify_true() instead, works though Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list