From: Ian Jackson Date: Tue, 31 Mar 2009 14:37:58 +0000 (+0100) Subject: Fixes from Christoph Egger X-Git-Tag: xen-3.4.0-rc2~20 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=cbb61e46e0d5218da5c7a90686ea996f9b5d0ac3;p=qemu-xen-4.0-testing.git Fixes from Christoph Egger - xen-vl-exra.c: Only compile pci_emulation_add() w/ CONFIG_PASSTHROUGH - Fix compiler confusion with tokens after #endif - qemu-common.h: Fix merge botch with upstream - qemu-xen.h: remove redundant declaration of pci_xen_platform_init - xen_platform.c: take declaration of pci_xen_platform_init from xen_platform.h - xen_platform.c: Make platform_fixed_ioport_save and platform_fixed_ioport_load static. They have no prototypes and aren't used elsewhere Signed-off-by: Christoph Egger --- diff --git a/block-raw-posix.c b/block-raw-posix.c index 93bd2723..e8c10c1c 100644 --- a/block-raw-posix.c +++ b/block-raw-posix.c @@ -1232,4 +1232,4 @@ BlockDriver bdrv_host_device = { .bdrv_ioctl = raw_ioctl, }; -#endif CONFIG_STUBDOM +#endif /* CONFIG_STUBDOM */ diff --git a/block-vvfat.c b/block-vvfat.c index ae2ead9c..5aa2a009 100644 --- a/block-vvfat.c +++ b/block-vvfat.c @@ -1778,7 +1778,7 @@ DLOG(fprintf(stderr, "read cluster %d (sector %d)\n", (int)cluster_num, (int)clu } for (i = 0; i < 0x10 * s->sectors_per_cluster; i++) { - int cluster_count; + int cluster_count = 0; DLOG(fprintf(stderr, "check direntry %d: \n", i); print_direntry(direntries + i)); if (is_volume_label(direntries + i) || is_dot(direntries + i) || diff --git a/hw/xen_platform.c b/hw/xen_platform.c index e77ee9f0..9827e3f6 100644 --- a/hw/xen_platform.c +++ b/hw/xen_platform.c @@ -29,6 +29,7 @@ #include "irq.h" #include "qemu-xen.h" #include "net.h" +#include "xen_platform.h" #include #include @@ -254,12 +255,12 @@ static uint32_t platform_fixed_ioport_read1(void *opaque, uint32_t addr) } } -void platform_fixed_ioport_save(QEMUFile *f, void *opaque) +static void platform_fixed_ioport_save(QEMUFile *f, void *opaque) { qemu_put_8s(f, &platform_flags); } -int platform_fixed_ioport_load(QEMUFile *f, void *opaque, int version_id) +static int platform_fixed_ioport_load(QEMUFile *f, void *opaque, int version_id) { uint8_t flags; diff --git a/posix-aio-compat.c b/posix-aio-compat.c index c2310109..a394d936 100644 --- a/posix-aio-compat.c +++ b/posix-aio-compat.c @@ -206,4 +206,4 @@ int qemu_paio_cancel(int fd, struct qemu_paiocb *aiocb) return ret; } -#endif CONFIG_STUBDOM +#endif /* CONFIG_STUBDOM */ diff --git a/qemu-common.h b/qemu-common.h index c8c9b823..f7bdb09e 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -133,17 +133,6 @@ int qemu_fls(int i); #define qemu_isascii(c) isascii((unsigned char)(c)) #define qemu_toascii(c) toascii((unsigned char)(c)) -#define CTYPE(isfoobar,argumentchar) (isfoobar((unsigned char)(argumentchar))) - /* One must not pass a plain `char' to isupper, toupper, et al. If - * it has the top bit set (ie, is negative if your chars are - * signed), undefined behaviour results. The functions - * are defined to take the value of an unsigned char, as an int. - * So use this macro. You may pass toupper et al for isfoobar. - * Do not pass EOF as a character to this macro. If you might have - * EOF then you ought to have it in an int representing an unsigned - * char, which is safe for the ctype macros directly. Or test separately. - * Obviously don't use this for floating point things like isnan! */ - void *qemu_malloc(size_t size); void *qemu_realloc(void *ptr, size_t size); void *qemu_mallocz(size_t size); diff --git a/qemu-xen.h b/qemu-xen.h index ec4cd943..34210f9c 100644 --- a/qemu-xen.h +++ b/qemu-xen.h @@ -24,7 +24,6 @@ void timeoffset_get(void); /* xen_platform.c */ #ifndef QEMU_TOOL -void pci_xen_platform_init(PCIBus *bus); void xen_vga_populate_vram(uint64_t vram_addr, uint32_t size); void xen_vga_vram_map(uint64_t vram_addr, uint32_t size); void set_vram_mapping(void *opaque, unsigned long begin, unsigned long end); diff --git a/xen-vl-extra.c b/xen-vl-extra.c index 8e449a8b..9be1acd0 100644 --- a/xen-vl-extra.c +++ b/xen-vl-extra.c @@ -132,7 +132,6 @@ void do_pci_add(char *devname) acpi_php_add(pci_slot); } -#endif int pci_emulation_add(char *config_text) { @@ -145,3 +144,4 @@ int pci_emulation_add(char *config_text) PciEmulationInfoHead = new; return 0; } +#endif