From 1c5e4578be343a27cc2f40ff7a3bba058631065f Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Wed, 31 May 2023 10:43:47 -0500 Subject: [PATCH] fixed: gcc warning --- compiler/src/wasm_runtime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/src/wasm_runtime.c b/compiler/src/wasm_runtime.c index a790be00..58c3cdeb 100644 --- a/compiler/src/wasm_runtime.c +++ b/compiler/src/wasm_runtime.c @@ -437,7 +437,8 @@ static b32 link_wasm_imports( { char *funcname = bh_aprintf(bh_heap_allocator(), "%b.%b", module_name->data, module_name->size, import_name->data, import_name->size); - wasm_functype_t *wasm_functype = wasm_externtype_as_functype(wasm_importtype_type(module_imports.data[i])); + wasm_externtype_t *import_type = (wasm_externtype_t *) wasm_importtype_type(module_imports.data[i]); + wasm_functype_t *wasm_functype = wasm_externtype_as_functype(import_type); wasm_func_t* wasm_func = wasm_func_new_with_env(wasm_store, wasm_functype, __error_on_call, funcname, NULL); import = wasm_func_as_extern(wasm_func); } -- 2.25.1