]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix build in qemu_command
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Thu, 18 Sep 2014 06:36:27 +0000 (10:36 +0400)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Thu, 18 Sep 2014 09:37:12 +0000 (13:37 +0400)
Currently, build with clang fails with:

  CC       qemu/libvirt_driver_qemu_impl_la-qemu_command.lo
qemu/qemu_command.c:6580:58: error: implicit conversion from enumeration type
'virMemAccess' to different enumeration type 'virTristateSwitch'
[-Werror,-Wenum-conversion]
        virTristateSwitch memAccess = def->cpu->cells[i].memAccess;
                          ~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~
1 error generated.

Fix that by using virMemAccess instead of virTristateSwitch.

src/qemu/qemu_command.c

index f2e6e5a2403b81d24266dfa4e9826d2ee3f4900f..ce320def4caba45255f1437050dedf8bbeedbb73 100644 (file)
@@ -6577,7 +6577,7 @@ qemuBuildNumaArgStr(virQEMUDriverConfigPtr cfg,
     for (i = 0; i < def->cpu->ncells; i++) {
         int cellmem = VIR_DIV_UP(def->cpu->cells[i].mem, 1024);
         def->cpu->cells[i].mem = cellmem * 1024;
-        virTristateSwitch memAccess = def->cpu->cells[i].memAccess;
+        virMemAccess memAccess = def->cpu->cells[i].memAccess;
 
         VIR_FREE(cpumask);
         VIR_FREE(nodemask);