From 4653de90d274aaf050422f5f3c44fc0754825e58 Mon Sep 17 00:00:00 2001 From: Xu Jun <693788454@qq.com> Date: Wed, 10 Aug 2022 12:26:17 +0800 Subject: [PATCH] Fix a maybe-uninitialized use warning (#1370) When `OS_ENABLE_HW_BOUND_CHECK` isn't defined and `WASM_ENABLE_THREAD_MGR == 0`, the `exec_env` is used without initialization. --- core/iwasm/interpreter/wasm_runtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/iwasm/interpreter/wasm_runtime.c b/core/iwasm/interpreter/wasm_runtime.c index 1d590bd6..02284f3a 100644 --- a/core/iwasm/interpreter/wasm_runtime.c +++ b/core/iwasm/interpreter/wasm_runtime.c @@ -2032,7 +2032,7 @@ wasm_create_exec_env_and_call_function(WASMModuleInstance *module_inst, unsigned argc, uint32 argv[], bool enable_debug) { - WASMExecEnv *exec_env, *existing_exec_env = NULL; + WASMExecEnv *exec_env = NULL, *existing_exec_env = NULL; bool ret; #if defined(OS_ENABLE_HW_BOUND_CHECK)