Selaa lähdekoodia

Fix printing ref.extern addresses in wasm_application.c (#2774)

Huang Qi 2 vuotta sitten
vanhempi
sitoutus
b92906464e
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      core/iwasm/common/wasm_application.c

+ 2 - 2
core/iwasm/common/wasm_application.c

@@ -600,7 +600,7 @@ execute_func(WASMModuleInstanceCommon *module_inst, const char *name,
             {
             {
 #if UINTPTR_MAX == UINT32_MAX
 #if UINTPTR_MAX == UINT32_MAX
                 if (argv1[k] != 0 && argv1[k] != (uint32)-1)
                 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
                 else
                     os_printf("extern:ref.null");
                     os_printf("extern:ref.null");
                 k++;
                 k++;
@@ -613,7 +613,7 @@ execute_func(WASMModuleInstanceCommon *module_inst, const char *name,
                 u.parts[1] = argv1[k + 1];
                 u.parts[1] = argv1[k + 1];
                 k += 2;
                 k += 2;
                 if (u.val && u.val != (uintptr_t)-1LL)
                 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
                 else
                     os_printf("extern:ref.null");
                     os_printf("extern:ref.null");
 #endif
 #endif