aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYonggang Luo <luoyonggang@gmail.com>2020-10-07 17:00:36 +0100
committerAlex Bennée <alex.bennee@linaro.org>2020-10-09 17:27:55 +0100
commit27d891bca9267e18e09540ae62d2096821b103c1 (patch)
tree3b949eedeb72c182d3478e994020c14012925c98 /tests
parentb31371004f46e46235dff1f4f854bbd5ba774879 (diff)
plugin: Fixes compiling errors on msys2/mingw
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201001163429.1348-3-luoyonggang@gmail.com> Message-Id: <20201007160038.26953-21-alex.bennee@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/plugin/bb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/plugin/bb.c b/tests/plugin/bb.c
index e4cc7fdd6e..de09bdde4e 100644
--- a/tests/plugin/bb.c
+++ b/tests/plugin/bb.c
@@ -72,7 +72,7 @@ static void vcpu_tb_exec(unsigned int cpu_index, void *udata)
CPUCount *count = max_cpus ?
g_ptr_array_index(counts, cpu_index) : &inline_count;
- unsigned long n_insns = (unsigned long)udata;
+ uintptr_t n_insns = (uintptr_t)udata;
g_mutex_lock(&count->lock);
count->insn_count += n_insns;
count->bb_count++;
@@ -81,7 +81,7 @@ static void vcpu_tb_exec(unsigned int cpu_index, void *udata)
static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb)
{
- unsigned long n_insns = qemu_plugin_tb_n_insns(tb);
+ size_t n_insns = qemu_plugin_tb_n_insns(tb);
if (do_inline) {
qemu_plugin_register_vcpu_tb_exec_inline(tb, QEMU_PLUGIN_INLINE_ADD_U64,