• Gonglei's avatar
    Fix debug print warning · c5539cb4
    Gonglei authored
    Steps:
    
    1.enable qemu debug print, using simply scprit as below:
     grep "//#define DEBUG" * -rl | xargs sed -i "s/\/\/#define DEBUG/#define DEBUG/g"
    2. make -j
    3. get some warning:
    hw/i2c/pm_smbus.c: In function 'smb_ioport_writeb':
    hw/i2c/pm_smbus.c:142: warning: format '%04x' expects type 'unsigned int', but argument 2 has type 'hwaddr'
    hw/i2c/pm_smbus.c:142: warning: format '%02x' expects type 'unsigned int', but argument 3 has type 'uint64_t'
    hw/i2c/pm_smbus.c: In function 'smb_ioport_readb':
    hw/i2c/pm_smbus.c:209: warning: format '%04x' expects type 'unsigned int', but argument 2 has type 'hwaddr'
    hw/intc/i8259.c: In function 'pic_ioport_read':
    hw/intc/i8259.c:373: warning: format '%02x' expects type 'unsigned int', but argument 2 has type 'hwaddr'
    hw/input/pckbd.c: In function 'kbd_write_command':
    hw/input/pckbd.c:232: warning: format '%02x' expects type 'unsigned int', but argument 2 has type 'uint64_t'
    hw/input/pckbd.c: In function 'kbd_write_data':
    hw/input/pckbd.c:333: warning: format '%02x' expects type 'unsigned int', but argument 2 has type 'uint64_t'
    hw/isa/apm.c: In function 'apm_ioport_writeb':
    hw/isa/apm.c:44: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'hwaddr'
    hw/isa/apm.c:44: warning: format '%02x' expects type 'unsigned int', but argument 3 has type 'uint64_t'
    hw/isa/apm.c: In function 'apm_ioport_readb':
    hw/isa/apm.c:67: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'hwaddr'
    hw/timer/mc146818rtc.c: In function 'cmos_ioport_write':
    hw/timer/mc146818rtc.c:394: warning: format '%02x' expects type 'unsigned int', but argument 3 has type 'uint64_t'
    hw/i386/pc.c: In function 'port92_write':
    hw/i386/pc.c:479: warning: format '%02x' expects type 'unsigned int', but argument 2 has type 'uint64_t'
    
    Fix them.
    
    Cc: qemu-trivial@nongnu.org
    Signed-off-by: default avatarGonglei <arei.gonglei@huawei.com>
    Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
    c5539cb4
Name
Last commit
Last update
..
Makefile.objs Loading commit data...
bitbang_i2c.c Loading commit data...
bitbang_i2c.h Loading commit data...
core.c Loading commit data...
exynos4210_i2c.c Loading commit data...
omap_i2c.c Loading commit data...
pm_smbus.c Loading commit data...
smbus.c Loading commit data...
smbus_eeprom.c Loading commit data...
smbus_ich9.c Loading commit data...
versatile_i2c.c Loading commit data...