From b92906464ea7d6f3a231c28e25db604cc91b59a4 Mon Sep 17 00:00:00 2001 From: Huang Qi Date: Thu, 16 Nov 2023 15:10:58 +0800 Subject: [PATCH] Fix printing ref.extern addresses in wasm_application.c (#2774) --- core/iwasm/common/wasm_application.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/iwasm/common/wasm_application.c b/core/iwasm/common/wasm_application.c index bcd0a6d0..93c9342d 100644 --- a/core/iwasm/common/wasm_application.c +++ b/core/iwasm/common/wasm_application.c @@ -600,7 +600,7 @@ execute_func(WASMModuleInstanceCommon *module_inst, const char *name, { #if UINTPTR_MAX == UINT32_MAX if (argv1[k] != 0 && argv1[k] != (uint32)-1) - os_printf("0x%" PRIxPTR ":ref.extern", (void *)argv1[k]); + os_printf("0x%" PRIxPTR ":ref.extern", (uintptr_t)argv1[k]); else os_printf("extern:ref.null"); k++; @@ -613,7 +613,7 @@ execute_func(WASMModuleInstanceCommon *module_inst, const char *name, u.parts[1] = argv1[k + 1]; k += 2; if (u.val && u.val != (uintptr_t)-1LL) - os_printf("0x%" PRIxPTR ":ref.extern", (void *)u.val); + os_printf("0x%" PRIxPTR ":ref.extern", u.val); else os_printf("extern:ref.null"); #endif