Fix issues reported by klocwork (#1060)
Fix issues reported by klocwork, fix host_tool compile error, and update build script of benchmark jetstream
This commit is contained in:
@ -1309,7 +1309,8 @@ wasm_runtime_finalize_call_function(WASMExecEnv *exec_env,
|
||||
|
||||
bh_assert((argv && ret_argv) || (argc == 0));
|
||||
|
||||
if (argv == ret_argv) {
|
||||
if (argv == ret_argv || argc == 0) {
|
||||
/* no need to transfrom externref results */
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2398,7 +2399,7 @@ wasm_runtime_init_wasi(WASMModuleInstanceCommon *module_inst,
|
||||
address = strtok(cp, "/");
|
||||
mask = strtok(NULL, "/");
|
||||
|
||||
ret = addr_pool_insert(apool, address, (uint8)(atoi(mask)));
|
||||
ret = addr_pool_insert(apool, address, (uint8)(mask ? atoi(mask) : 0));
|
||||
wasm_runtime_free(cp);
|
||||
if (!ret) {
|
||||
set_error_buf(error_buf, error_buf_size,
|
||||
|
||||
Reference in New Issue
Block a user