[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits
From: |
Pierrick Bouvier |
Subject: |
[PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits host |
Date: |
Wed, 14 Aug 2024 16:36:41 -0700 |
Found on debian stable (i386).
../contrib/plugins/cache.c: In function 'vcpu_tb_trans':
../contrib/plugins/cache.c:477:30: error: cast from pointer to integer of
different size [-Werror=pointer-to-int-cast]
477 | effective_addr = (uint64_t) qemu_plugin_insn_haddr(insn);
|
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
contrib/plugins/cache.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c
index 512ef6776b7..82ed734d6d4 100644
--- a/contrib/plugins/cache.c
+++ b/contrib/plugins/cache.c
@@ -471,12 +471,12 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct
qemu_plugin_tb *tb)
n_insns = qemu_plugin_tb_n_insns(tb);
for (i = 0; i < n_insns; i++) {
struct qemu_plugin_insn *insn = qemu_plugin_tb_get_insn(tb, i);
- uint64_t effective_addr;
+ uintptr_t effective_addr;
if (sys) {
- effective_addr = (uint64_t) qemu_plugin_insn_haddr(insn);
+ effective_addr = (uintptr_t) qemu_plugin_insn_haddr(insn);
} else {
- effective_addr = (uint64_t) qemu_plugin_insn_vaddr(insn);
+ effective_addr = (uintptr_t) qemu_plugin_insn_vaddr(insn);
}
/*
--
2.39.2
- [PATCH 0/6] build contrib/plugins using meson, Pierrick Bouvier, 2024/08/14
- [PATCH 1/6] contrib/plugins/execlog: fix warning, Pierrick Bouvier, 2024/08/14
- [PATCH 3/6] contrib/plugins/hwprofile: fix warning when compiling on 32bits host, Pierrick Bouvier, 2024/08/14
- [PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits host,
Pierrick Bouvier <=
- Re: [PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits host, Thomas Huth, 2024/08/15
- Re: [PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits host, Alex Bennée, 2024/08/15
- Re: [PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits host, Pierrick Bouvier, 2024/08/15
- Re: [PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits host, Pierrick Bouvier, 2024/08/15
- Re: [PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits host, Alex Bennée, 2024/08/16
- Re: [PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits host, Richard Henderson, 2024/08/15
- Re: [PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits host, Alex Bennée, 2024/08/16
- Re: [PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits host, Peter Maydell, 2024/08/16
- Re: [PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits host, Richard Henderson, 2024/08/16
- [PATCH 5/6] meson: build contrib/plugins with meson, Pierrick Bouvier, 2024/08/14