From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Alexandre Iooss" <erdnaxe@crans.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Mahmoud Mandour" <ma.mandourr@gmail.com>,
"Thomas Huth" <thuth@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 4/5] contrib/plugins/lockstep: Fix string format
Date: Thu, 7 Sep 2023 12:50:03 +0200 [thread overview]
Message-ID: <20230907105004.88600-5-philmd@linaro.org> (raw)
In-Reply-To: <20230907105004.88600-1-philmd@linaro.org>
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>
---
contrib/plugins/lockstep.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c
index 850f7b2941..682b11feb2 100644
--- a/contrib/plugins/lockstep.c
+++ b/contrib/plugins/lockstep.c
@@ -134,7 +134,9 @@ static void report_divergance(ExecState *us, ExecState *them)
/* Output short log entry of going out of sync... */
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),
divrec.distance);
qemu_plugin_outs(out->str);
@@ -144,7 +146,9 @@ static void report_divergance(ExecState *us, ExecState *them)
int i;
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);
for (entry = log, i = 0;
@@ -152,7 +156,8 @@ static void report_divergance(ExecState *us, ExecState *them)
entry = g_slist_next(entry), i++) {
ExecInfo *prev = (ExecInfo *) entry->data;
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->insn_count);
}
--
2.41.0
next prev parent reply other threads:[~2023-09-07 10:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-07 10:49 [PATCH 0/5] contrib/plugins: Build fixes for Darwin Philippe Mathieu-Daudé
2023-09-07 10:50 ` [PATCH 1/5] contrib/plugins/cache: Fix string format Philippe Mathieu-Daudé
2023-09-07 10:50 ` [PATCH 2/5] contrib/plugins/drcov: " Philippe Mathieu-Daudé
2023-09-07 10:50 ` [PATCH 3/5] contrib/plugins/howvec: " Philippe Mathieu-Daudé
2023-09-07 10:50 ` Philippe Mathieu-Daudé [this message]
2023-09-07 10:50 ` [PATCH 5/5] contrib/plugins: Link with GLib Philippe Mathieu-Daudé
2023-09-07 10:57 ` [PATCH 0/5] contrib/plugins: Build fixes for Darwin Paolo Bonzini
2023-09-07 11:24 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230907105004.88600-5-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=erdnaxe@crans.org \
--cc=ma.mandourr@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).