Skip to content

Commit d7a2888

Browse files
authored
Fix Windows compilation warnings (#1171)
And update the Zephyr platform sample help, add arc target into usage list.
1 parent 0993601 commit d7a2888

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

core/iwasm/common/wasm_runtime_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@ wasm_runtime_prepare_call_function(WASMExecEnv *exec_env,
12731273
}
12741274

12751275
if (!need_param_transform) {
1276-
bh_memcpy_s(new_argv, size, argv, size);
1276+
bh_memcpy_s(new_argv, (uint32)size, argv, (uint32)size);
12771277
}
12781278
else {
12791279
for (param_i = 0; param_i < func_type->param_count && argv_i < argc

core/iwasm/interpreter/wasm_interp_classic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ wasm_interp_call_func_native(WASMModuleInstance *module_inst,
787787

788788
wasm_exec_env_set_cur_frame(exec_env, frame);
789789

790-
cur_func_index = cur_func - module_inst->functions;
790+
cur_func_index = (uint32)(cur_func - module_inst->functions);
791791
bh_assert(cur_func_index < module_inst->module->import_function_count);
792792
native_func_pointer = module_inst->import_func_ptrs[cur_func_index];
793793

core/iwasm/interpreter/wasm_interp_fast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ wasm_interp_call_func_native(WASMModuleInstance *module_inst,
854854

855855
wasm_exec_env_set_cur_frame(exec_env, frame);
856856

857-
cur_func_index = cur_func - module_inst->functions;
857+
cur_func_index = (uint32)(cur_func - module_inst->functions);
858858
bh_assert(cur_func_index < module_inst->module->import_function_count);
859859
native_func_pointer = module_inst->import_func_ptrs[cur_func_index];
860860

product-mini/platforms/zephyr/simple/build_and_run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ usage ()
2828
echo " $0 $QEMU_XTENSA_TARGET"
2929
echo " $0 $QEMU_RISCV64_TARGET"
3030
echo " $0 $QEMU_RISCV32_TARGET"
31+
echo " $0 $QEMU_ARC_TARGET"
3132
exit 1
3233
}
3334

0 commit comments

Comments
 (0)