* [PATCH] If DEBUG_MEMREG is defined, build fails.
@ 2009-12-01 15:27 Kusanagi Kouichi
2009-12-02 13:03 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Kusanagi Kouichi @ 2009-12-01 15:27 UTC (permalink / raw)
To: kvm
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@ac.auone-net.jp>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] If DEBUG_MEMREG is defined, build fails.
2009-12-01 15:27 [PATCH] If DEBUG_MEMREG is defined, build fails Kusanagi Kouichi
@ 2009-12-02 13:03 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-12-02 13:03 UTC (permalink / raw)
To: Kusanagi Kouichi; +Cc: kvm
On 12/01/2009 05:27 PM, Kusanagi Kouichi wrote:
> 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
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-02 13:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01 15:27 [PATCH] If DEBUG_MEMREG is defined, build fails Kusanagi Kouichi
2009-12-02 13:03 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox