Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Correct format portability warnings #8

Merged
merged 1 commit into from
Apr 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hw/arm/cortexm-mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static void cortexm_mcu_do_unassigned_access_callback(CPUState *cpu,
bool is_write, bool is_exec, int opaque, unsigned size)
{
qemu_log_mask(LOG_TRACE,
"%s(addr=0x%08llX, size=%d, is_write=%s, is_exec=%s)\n",
"%s(addr=0x%08"PRIX64", size=%d, is_write=%s, is_exec=%s)\n",
__FUNCTION__, addr, size, is_write ? "true" : "false",
is_exec ? "true" : "false");

Expand Down
2 changes: 1 addition & 1 deletion hw/core/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ int rom_add_elf_program(const char *name, void *data, size_t datasize,

#if defined(CONFIG_VERBOSE)
if (verbosity_level >= VERBOSITY_DETAILED) {
printf("Load %6zu bytes at 0x%08llX-0x%08llX.\n", romsize, addr, addr+romsize-1);
printf("Load %6zu bytes at 0x%08"PRIX64"-0x%08"PRIX64".\n", romsize, addr, addr+romsize-1);
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion hw/core/sysbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static void sysbus_mmio_map_common(SysBusDevice *dev, int n, hwaddr addr,
assert(n >= 0 && n < dev->num_mmio);

#if defined(CONFIG_GNU_ARM_ECLIPSE)
qemu_log_mask(LOG_TRACE, "%s(0x%08llX)\n", __FUNCTION__, addr);
qemu_log_mask(LOG_TRACE, "%s(0x%08"PRIX64")\n", __FUNCTION__, addr);
#endif

if (dev->mmio[n].addr == addr) {
Expand Down
4 changes: 2 additions & 2 deletions hw/misc/peripheral-register.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,8 +810,8 @@ static void peripheral_register_realize_callback(DeviceState *dev, Error **errp)
}

qemu_log_mask(LOG_TRACE,
"%s() '%s', readable: 0x%08llX, writable: 0x%08llX, "
"reset: 0x%08llX, mode: %s%s\n", __FUNCTION__, state->name,
"%s() '%s', readable: 0x%08"PRIX64", writable: 0x%08"PRIX64", "
"reset: 0x%08"PRIX64", mode: %s%s\n", __FUNCTION__, state->name,
state->readable_bits, state->writable_bits, state->reset_value,
state->is_readable ? "r" : "", state->is_writable ? "w" : "");
}
Expand Down
4 changes: 2 additions & 2 deletions hw/misc/peripheral.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static uint64_t peripheral_read_callback(void *opaque, hwaddr addr,
state->registers[index]);
if (reg == NULL) {
qemu_log_mask(LOG_UNIMP, "%s: Peripheral read of size %d at offset "
"0x%llX not implemented.\n", object_get_typename(OBJECT(state)),
"0x%"PRIX64" not implemented.\n", object_get_typename(OBJECT(state)),
size, addr);
return 0;
}
Expand Down Expand Up @@ -128,7 +128,7 @@ static void peripheral_write_callback(void *opaque, hwaddr addr, uint64_t value,
state->registers[index]);
if (reg == NULL) {
qemu_log_mask(LOG_UNIMP,
"%s: Write of size %d at offset 0x%llX not implemented.\n",
"%s: Write of size %d at offset 0x%"PRIX64" not implemented.\n",
object_get_typename(OBJECT(state)), size, addr);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion hw/misc/register-bitfield.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ static void register_bitfield_realize_callback(DeviceState *dev, Error **errp)
}

qemu_log_mask(LOG_TRACE,
"%s() '%s[%d:%d]', mask: 0x%llX, shift: %d, mode: %s%s\n",
"%s() '%s[%d:%d]', mask: 0x%"PRIX64", shift: %d, mode: %s%s\n",
__FUNCTION__, state->name, state->first_bit,
state->first_bit + state->width_bits + 1, state->mask, state->shift,
state->is_readable ? "r" : "", state->is_writable ? "w" : "");
Expand Down
26 changes: 13 additions & 13 deletions memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,16 +411,16 @@ static MemTxResult memory_region_read_accessor(MemoryRegion *mr,
; /* Skip ITM */
} else {
if (size == 1) {
qemu_log_mask(LOG_TRACE_MR, "rd8(0x%08llX) 0x%02X)\n",
qemu_log_mask(LOG_TRACE_MR, "rd8(0x%08"PRIX64") 0x%02X)\n",
a, (uint8_t)tmp);
} else if (size == 2){
qemu_log_mask(LOG_TRACE_MR, "rd16(0x%08llX) 0x%04X)\n",
qemu_log_mask(LOG_TRACE_MR, "rd16(0x%08"PRIX64") 0x%04X)\n",
a, (uint16_t)tmp);
} else if (size == 4){
qemu_log_mask(LOG_TRACE_MR, "rd32(0x%08llX) 0x%08X)\n",
qemu_log_mask(LOG_TRACE_MR, "rd32(0x%08"PRIX64") 0x%08X)\n",
a, (uint32_t)tmp);
} else {
qemu_log_mask(LOG_TRACE_MR, "rd(0x%08llX, %d) 0x%llX\n",
qemu_log_mask(LOG_TRACE_MR, "rd(0x%08"PRIX64", %d) 0x%"PRIX64"\n",
a, size, tmp);
}
}
Expand Down Expand Up @@ -455,16 +455,16 @@ static MemTxResult memory_region_read_with_attrs_accessor(MemoryRegion *mr,
; /* Skip ITM */
} else {
if (size == 1) {
qemu_log_mask(LOG_TRACE_MR, "rd8(0x%08llX) 0x%02X)\n",
qemu_log_mask(LOG_TRACE_MR, "rd8(0x%08"PRIX64") 0x%02X)\n",
a, (uint8_t)tmp);
} else if (size == 2){
qemu_log_mask(LOG_TRACE_MR, "rd16(0x%08llX) 0x%04X)\n",
qemu_log_mask(LOG_TRACE_MR, "rd16(0x%08"PRIX64") 0x%04X)\n",
a, (uint16_t)tmp);
} else if (size == 4){
qemu_log_mask(LOG_TRACE_MR, "rd32(0x%08llX) 0x%08X)\n",
qemu_log_mask(LOG_TRACE_MR, "rd32(0x%08"PRIX64") 0x%08X)\n",
a, (uint32_t)tmp);
} else {
qemu_log_mask(LOG_TRACE_MR, "rd(0x%08llX, %d) 0x%llX\n",
qemu_log_mask(LOG_TRACE_MR, "rd(0x%08"PRIX64", %d) 0x%"PRIX64"\n",
a, size, tmp);
}
}
Expand Down Expand Up @@ -516,16 +516,16 @@ static MemTxResult memory_region_write_accessor(MemoryRegion *mr,
; /* Skip ITM */
} else {
if (size == 1) {
qemu_log_mask(LOG_TRACE_MR, "wr8(0x%08llX, 0x%02X)\n",
qemu_log_mask(LOG_TRACE_MR, "wr8(0x%08"PRIX64", 0x%02X)\n",
a, (uint8_t)tmp);
} else if (size == 2){
qemu_log_mask(LOG_TRACE_MR, "wr16(0x%08llX, 0x%04X)\n",
qemu_log_mask(LOG_TRACE_MR, "wr16(0x%08"PRIX64", 0x%04X)\n",
a, (uint16_t)tmp);
} else if (size == 4){
qemu_log_mask(LOG_TRACE_MR, "wr32(0x%08llX, 0x%08X)\n",
qemu_log_mask(LOG_TRACE_MR, "wr32(0x%08"PRIX64", 0x%08X)\n",
a, (uint32_t)tmp);
} else {
qemu_log_mask(LOG_TRACE_MR, "wr(0x%08llX, 0x%llX, %d)\n",
qemu_log_mask(LOG_TRACE_MR, "wr(0x%08"PRIX64", 0x%"PRIX64", %d)\n",
a, tmp, size);
}
}
Expand Down Expand Up @@ -996,7 +996,7 @@ void memory_region_init(MemoryRegion *mr,
{
#if defined(CONFIG_GNU_ARM_ECLIPSE)
if (name != NULL) {
qemu_log_mask(LOG_TRACE, "%s(\"%s\", 0x%llX)\n", __FUNCTION__, name, size);
qemu_log_mask(LOG_TRACE, "%s(\"%s\", 0x%"PRIX64")\n", __FUNCTION__, name, size);
}
#endif
if (!owner) {
Expand Down
2 changes: 1 addition & 1 deletion qom/qom-qobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static char *dump_value(QObject *value, char *buf, size_t siz)
{
if (value->type->code == QTYPE_QINT) {
QInt *p = (QInt *) value;
snprintf(buf, siz, "%lld", p->value);
snprintf(buf, siz, "%" PRId64, p->value);
return buf;
} else if (value->type->code == QTYPE_QSTRING) {
QString *p = (QString *) value;
Expand Down