From cb67be85a612e8b9ab25edb68976c0fa203d12ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Mon, 6 Feb 2012 22:19:42 +0100 Subject: ide: fix compilation errors when DEBUG_IDE is set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hervé Poussineau Signed-off-by: Stefan Hajnoczi --- hw/ide/pci.c | 2 +- hw/ide/piix.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'hw') diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 246dd57..88c0942 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -336,7 +336,7 @@ static uint64_t bmdma_addr_read(void *opaque, target_phys_addr_t addr, data = (bm->addr >> (addr * 8)) & mask; #ifdef DEBUG_IDE - printf("%s: 0x%08x\n", __func__, (unsigned)*data); + printf("%s: 0x%08x\n", __func__, (unsigned)data); #endif return data; } diff --git a/hw/ide/piix.c b/hw/ide/piix.c index bf4465b..76cf209 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -53,7 +53,7 @@ static uint64_t bmdma_read(void *opaque, target_phys_addr_t addr, unsigned size) break; } #ifdef DEBUG_IDE - printf("bmdma: readb 0x%02x : 0x%02x\n", addr, val); + printf("bmdma: readb 0x%02x : 0x%02x\n", (uint8_t)addr, val); #endif return val; } @@ -68,7 +68,7 @@ static void bmdma_write(void *opaque, target_phys_addr_t addr, } #ifdef DEBUG_IDE - printf("bmdma: writeb 0x%02x : 0x%02x\n", addr, val); + printf("bmdma: writeb 0x%02x : 0x%02x\n", (uint8_t)addr, (uint8_t)val); #endif switch(addr & 3) { case 0: -- cgit v1.1 From 31de83140d23ccc0e290bc0de609ba2b1aff674a Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 7 Feb 2012 22:26:29 +0100 Subject: fmopl: Fix typo in function name Fix a typo in a local function name. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- hw/fmopl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw') diff --git a/hw/fmopl.c b/hw/fmopl.c index 734d2f4..f0a0234 100644 --- a/hw/fmopl.c +++ b/hw/fmopl.c @@ -733,7 +733,7 @@ INLINE void CSMKeyControll(OPL_CH *CH) } /* ---------- opl initialize ---------- */ -static void OPL_initalize(FM_OPL *OPL) +static void OPL_initialize(FM_OPL *OPL) { int fn; @@ -1239,7 +1239,7 @@ FM_OPL *OPLCreate(int type, int clock, int rate) OPL->rate = rate; OPL->max_ch = max_ch; /* init grobal tables */ - OPL_initalize(OPL); + OPL_initialize(OPL); /* reset chip */ OPLResetChip(OPL); #ifdef OPL_OUTPUT_LOG -- cgit v1.1 From 6f79e06b35b26a1beda6f6dc4dd02588887597e9 Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Thu, 9 Feb 2012 11:29:42 -0200 Subject: virtio: Remove unneeded g_free() check in virtio_cleanup() Signed-off-by: Luiz Capitulino Signed-off-by: Stefan Hajnoczi --- hw/virtio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'hw') diff --git a/hw/virtio.c b/hw/virtio.c index 74cc038..064aecf 100644 --- a/hw/virtio.c +++ b/hw/virtio.c @@ -845,8 +845,7 @@ int virtio_load(VirtIODevice *vdev, QEMUFile *f) void virtio_cleanup(VirtIODevice *vdev) { qemu_del_vm_change_state_handler(vdev->vmstate); - if (vdev->config) - g_free(vdev->config); + g_free(vdev->config); g_free(vdev->vq); g_free(vdev); } -- cgit v1.1