x86emu: Fix type conversion warnings on x86_64 with DEBUG
Warnings come from the fact that PRIx32 is not used for printing 32 bit values instead of "%lx", and "%lx" evaluates to a 64 bit long on 64 bit systems while PRIx32 always evaluates to the right type for the respective arch. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
01470ce0a9
commit
cbca18c551
|
@ -191,7 +191,7 @@ rdb(u32 addr)
|
|||
u8 val;
|
||||
|
||||
if (addr > M.mem_size - 1) {
|
||||
DB(printk("mem_read: address %#lx out of range!\n", addr);
|
||||
DB(printk("mem_read: address %#" PRIx32 " out of range!\n", addr);
|
||||
)
|
||||
HALT_SYS();
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ rdw(u32 addr)
|
|||
u16 val = 0;
|
||||
|
||||
if (addr > M.mem_size - 2) {
|
||||
DB(printk("mem_read: address %#lx out of range!\n", addr);
|
||||
DB(printk("mem_read: address %#" PRIx32 " out of range!\n", addr);
|
||||
)
|
||||
HALT_SYS();
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ rdl(u32 addr)
|
|||
u32 val = 0;
|
||||
|
||||
if (addr > M.mem_size - 4) {
|
||||
DB(printk("mem_read: address %#lx out of range!\n", addr);
|
||||
DB(printk("mem_read: address %#" PRIx32 " out of range!\n", addr);
|
||||
)
|
||||
HALT_SYS();
|
||||
}
|
||||
|
@ -282,7 +282,7 @@ wrb(u32 addr, u8 val)
|
|||
DB(if (DEBUG_MEM_TRACE())
|
||||
printk("%#08x 1 <- %#x\n", addr, val);)
|
||||
if (addr > M.mem_size - 1) {
|
||||
DB(printk("mem_write: address %#lx out of range!\n", addr);
|
||||
DB(printk("mem_write: address %#" PRIx32 " out of range!\n",addr);
|
||||
)
|
||||
HALT_SYS();
|
||||
}
|
||||
|
@ -303,7 +303,7 @@ wrw(u32 addr, u16 val)
|
|||
DB(if (DEBUG_MEM_TRACE())
|
||||
printk("%#08x 2 <- %#x\n", addr, val);)
|
||||
if (addr > M.mem_size - 2) {
|
||||
DB(printk("mem_write: address %#lx out of range!\n", addr);
|
||||
DB(printk("mem_write: address %#" PRIx32 " out of range!\n",addr);
|
||||
)
|
||||
HALT_SYS();
|
||||
}
|
||||
|
@ -331,7 +331,7 @@ wrl(u32 addr, u32 val)
|
|||
DB(if (DEBUG_MEM_TRACE())
|
||||
printk("%#08x 4 <- %#x\n", addr, val);)
|
||||
if (addr > M.mem_size - 4) {
|
||||
DB(printk("mem_write: address %#lx out of range!\n", addr);
|
||||
DB(printk("mem_write: address %#" PRIx32 " out of range!\n",addr);
|
||||
)
|
||||
HALT_SYS();
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
/*---------------------- Macros and type definitions ----------------------*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
typedef uint8_t u8;
|
||||
typedef uint16_t u16;
|
||||
|
|
Loading…
Reference in New Issue