From 7b7bd4b67748f4b8922ee19b05c0653a798a34ce Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 5 Nov 2007 13:23:55 +0000 Subject: [PATCH] ioemu: Clean up compile warnings. Signed-off-by: Atsushi SAKAI Signed-off-by: Keir Fraser --- tools/ioemu/hw/xen_machine_fv.c | 2 ++ tools/ioemu/hw/xen_machine_pv.c | 3 ++- tools/ioemu/hw/xen_platform.c | 15 ++++++++------- tools/ioemu/vl.h | 2 +- tools/ioemu/xenstore.c | 4 ++-- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/tools/ioemu/hw/xen_machine_fv.c b/tools/ioemu/hw/xen_machine_fv.c index 1db5e7f9e8..68b04f9e00 100644 --- a/tools/ioemu/hw/xen_machine_fv.c +++ b/tools/ioemu/hw/xen_machine_fv.c @@ -194,7 +194,9 @@ static void xen_init_fv(uint64_t ram_size, int vga_ram_size, char *boot_device, const char *initrd_filename, const char *direct_pci) { +#if defined(__i386__) || defined(__x86_64__) unsigned long ioreq_pfn; +#endif extern void *shared_page; extern void *buffered_io_page; #ifdef __ia64__ diff --git a/tools/ioemu/hw/xen_machine_pv.c b/tools/ioemu/hw/xen_machine_pv.c index ab29f0244f..41f051dbf8 100644 --- a/tools/ioemu/hw/xen_machine_pv.c +++ b/tools/ioemu/hw/xen_machine_pv.c @@ -35,7 +35,8 @@ static void xen_init_pv(uint64_t ram_size, int vga_ram_size, char *boot_device, int snapshot, const char *kernel_filename, const char *kernel_cmdline, - const char *initrd_filename) + const char *initrd_filename, + const char *direct_pci) { struct xenfb *xenfb; extern int domid; diff --git a/tools/ioemu/hw/xen_platform.c b/tools/ioemu/hw/xen_platform.c index 9eaf35269c..597e2c05e6 100644 --- a/tools/ioemu/hw/xen_platform.c +++ b/tools/ioemu/hw/xen_platform.c @@ -38,21 +38,22 @@ static uint32_t platform_mmio_read(void *opaque, target_phys_addr_t addr) { static int warnings = 0; if (warnings < 5) { - fprintf(logfile, "Warning: attempted read from physical address " - "0x%lx in xen platform mmio space\n", addr); - warnings++; + fprintf(logfile, "Warning: attempted read from physical address " + "0x%"PRIx64" in xen platform mmio space\n", (uint64_t)addr); + warnings++; } return 0; } static void platform_mmio_write(void *opaque, target_phys_addr_t addr, - uint32_t val) + uint32_t val) { static int warnings = 0; if (warnings < 5) { - fprintf(logfile, "Warning: attempted write of 0x%x to physical " - "address 0x%lx in xen platform mmio space\n", val, addr); - warnings++; + fprintf(logfile, "Warning: attempted write of 0x%x to physical " + "address 0x%"PRIx64" in xen platform mmio space\n", + val, (uint64_t)addr); + warnings++; } return; } diff --git a/tools/ioemu/vl.h b/tools/ioemu/vl.h index 9dd8ec0c76..c5514962c3 100644 --- a/tools/ioemu/vl.h +++ b/tools/ioemu/vl.h @@ -1477,7 +1477,7 @@ int xenstore_unsubscribe_from_hotplug_status(struct xs_handle *handle, const char *token); int xenstore_vm_write(int domid, char *key, char *val); -char *xenstore_vm_read(int domid, char *key, int *len); +char *xenstore_vm_read(int domid, char *key, unsigned int *len); /* helper2.c */ extern long time_offset; diff --git a/tools/ioemu/xenstore.c b/tools/ioemu/xenstore.c index f24075eb30..08524fe914 100644 --- a/tools/ioemu/xenstore.c +++ b/tools/ioemu/xenstore.c @@ -303,7 +303,7 @@ void xenstore_process_logdirty_event(void) logdirty_bitmap_size *= sizeof (unsigned long); /* bytes */ /* Map the shared-memory segment */ - fprintf(logfile, "%s: key=%16.16llx size=%d\n", __FUNCTION__, + fprintf(logfile, "%s: key=%16.16llx size=%lu\n", __FUNCTION__, (unsigned long long)key, logdirty_bitmap_size); shmid = shmget(key, 2 * logdirty_bitmap_size, S_IRUSR|S_IWUSR); if (shmid == -1) { @@ -676,7 +676,7 @@ int xenstore_unsubscribe_from_hotplug_status(struct xs_handle *handle, return rc; } -char *xenstore_vm_read(int domid, char *key, int *len) +char *xenstore_vm_read(int domid, char *key, unsigned int *len) { char *buf = NULL, *path = NULL, *value = NULL; -- 2.30.2