[PATCH] If DEBUG_MEMREG is defined, build fails.

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

 



If DEBUG_MEMREG is defined, build fails as follows.

  CC    x86_64-softmmu/kvm-all.o
cc1: warnings being treated as errors
In file included from kvm-all.c:1094:
qemu-kvm.c: In function 'set_gsi':
qemu-kvm.c:127: error: too few arguments for format
qemu-kvm.c: In function 'clear_gsi':
qemu-kvm.c:137: error: too few arguments for format
qemu-kvm.c: In function 'kvm_register_phys_mem':
qemu-kvm.c:577: error: format '%lx' expects type 'long unsigned int', but argument 9 has type '__u32'
qemu-kvm.c: In function 'kvm_unregister_memory_area':
qemu-kvm.c:641: error: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'uint64_t'
make[1]: *** [kvm-all.o] Error 1
make: *** [subdir-x86_64-softmmu] Error 2

Signed-off-by: Kusanagi Kouichi <slash@xxxxxxxxxxxxxxx>
---
 qemu-kvm.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/qemu-kvm.c b/qemu-kvm.c
index 05caa1c..c992e65 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -124,7 +124,7 @@ static inline void set_gsi(kvm_context_t kvm, unsigned int gsi)
     if (gsi < kvm->max_gsi)
         bitmap[gsi / 32] |= 1U << (gsi % 32);
     else
-        DPRINTF("Invalid GSI %d\n");
+        DPRINTF("Invalid GSI %u\n", gsi);
 }
 
 static inline void clear_gsi(kvm_context_t kvm, unsigned int gsi)
@@ -134,7 +134,7 @@ static inline void clear_gsi(kvm_context_t kvm, unsigned int gsi)
     if (gsi < kvm->max_gsi)
         bitmap[gsi / 32] &= ~(1U << (gsi % 32));
     else
-        DPRINTF("Invalid GSI %d\n");
+        DPRINTF("Invalid GSI %u\n", gsi);
 }
 
 struct slot_info {
@@ -575,7 +575,7 @@ int kvm_register_phys_mem(kvm_context_t kvm,
 
     memory.slot = get_free_slot(kvm);
     DPRINTF
-        ("memory: gpa: %llx, size: %llx, uaddr: %llx, slot: %x, flags: %lx\n",
+        ("memory: gpa: %llx, size: %llx, uaddr: %llx, slot: %x, flags: %x\n",
          memory.guest_phys_addr, memory.memory_size, memory.userspace_addr,
          memory.slot, memory.flags);
     r = kvm_vm_ioctl(kvm_state, KVM_SET_USER_MEMORY_REGION, &memory);
@@ -638,7 +638,7 @@ void kvm_unregister_memory_area(kvm_context_t kvm, uint64_t phys_addr,
     int slot = get_container_slot(phys_addr, size);
 
     if (slot != -1) {
-        DPRINTF("Unregistering memory region %llx (%lx)\n", phys_addr, size);
+        DPRINTF("Unregistering memory region %" PRIx64 " (%lx)\n", phys_addr, size);
         kvm_destroy_phys_mem(kvm, phys_addr, size);
         return;
     }
-- 
1.6.5.3

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux