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.
This commit is contained in:
Xu Jun 2022-08-10 12:26:17 +08:00 committed by GitHub
parent 2ee01657a6
commit 4653de90d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)