ide: fix compilation errors when DEBUG_IDE is set
authorHervé Poussineau <hpoussin@reactos.org>
Mon, 6 Feb 2012 21:19:42 +0000 (22:19 +0100)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fri, 10 Feb 2012 10:44:52 +0000 (10:44 +0000)
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
hw/ide/pci.c
hw/ide/piix.c

index 246dd5704b8dc576970e018348098182d1f34a8e..88c0942e343582a23d7ea3e88b6e5cbbaa5460e5 100644 (file)
@@ -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;
 }
index bf4465bb4906733c24db6c30618725f312e3da00..76cf20947491be8b2617526815fb6d4f19738876 100644 (file)
@@ -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: