mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-31 22:33:53 -06:00
contrib/plugins/lockstep: Fix string format
This fixes on Darwin: plugins/lockstep.c:138:25: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, them->pc, g_slist_length(divergence_log), ^~~~~~ plugins/lockstep.c:138:33: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, them->pc, g_slist_length(divergence_log), ^~~~~~~~ plugins/lockstep.c:148:25: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, us->insn_count, them->pc, them->insn_count); ^~~~~~ plugins/lockstep.c:148:49: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, us->insn_count, them->pc, them->insn_count); ^~~~~~~~ plugins/lockstep.c:156:36: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] prev->block->pc, prev->block->insns, ^~~~~~~~~~~~~~~ plugins/lockstep.c:156:53: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] prev->block->pc, prev->block->insns, ^~~~~~~~~~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20230907105004.88600-5-philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
9b60d6a100
commit
3045019fc9
1 changed files with 8 additions and 3 deletions
|
@ -134,7 +134,9 @@ static void report_divergance(ExecState *us, ExecState *them)
|
||||||
|
|
||||||
/* Output short log entry of going out of sync... */
|
/* Output short log entry of going out of sync... */
|
||||||
if (verbose || divrec.distance == 1 || diverged) {
|
if (verbose || divrec.distance == 1 || diverged) {
|
||||||
g_string_printf(out, "@ 0x%016lx vs 0x%016lx (%d/%d since last)\n",
|
g_string_printf(out,
|
||||||
|
"@ 0x%016" PRIx64 " vs 0x%016" PRIx64
|
||||||
|
" (%d/%d since last)\n",
|
||||||
us->pc, them->pc, g_slist_length(divergence_log),
|
us->pc, them->pc, g_slist_length(divergence_log),
|
||||||
divrec.distance);
|
divrec.distance);
|
||||||
qemu_plugin_outs(out->str);
|
qemu_plugin_outs(out->str);
|
||||||
|
@ -144,7 +146,9 @@ static void report_divergance(ExecState *us, ExecState *them)
|
||||||
int i;
|
int i;
|
||||||
GSList *entry;
|
GSList *entry;
|
||||||
|
|
||||||
g_string_printf(out, "Δ insn_count @ 0x%016lx (%ld) vs 0x%016lx (%ld)\n",
|
g_string_printf(out,
|
||||||
|
"Δ insn_count @ 0x%016" PRIx64
|
||||||
|
" (%ld) vs 0x%016" PRIx64 " (%ld)\n",
|
||||||
us->pc, us->insn_count, them->pc, them->insn_count);
|
us->pc, us->insn_count, them->pc, them->insn_count);
|
||||||
|
|
||||||
for (entry = log, i = 0;
|
for (entry = log, i = 0;
|
||||||
|
@ -152,7 +156,8 @@ static void report_divergance(ExecState *us, ExecState *them)
|
||||||
entry = g_slist_next(entry), i++) {
|
entry = g_slist_next(entry), i++) {
|
||||||
ExecInfo *prev = (ExecInfo *) entry->data;
|
ExecInfo *prev = (ExecInfo *) entry->data;
|
||||||
g_string_append_printf(out,
|
g_string_append_printf(out,
|
||||||
" previously @ 0x%016lx/%ld (%ld insns)\n",
|
" previously @ 0x%016" PRIx64 "/%" PRId64
|
||||||
|
" (%ld insns)\n",
|
||||||
prev->block->pc, prev->block->insns,
|
prev->block->pc, prev->block->insns,
|
||||||
prev->insn_count);
|
prev->insn_count);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue