Fix compile warnings/error reported in Windows (#3616)

Clear some compile warnings and fix undefined reference error for symbol ffs
in Windows platform.
This commit is contained in:
Wenyong Huang
2024-07-12 16:43:22 +08:00
committed by GitHub
parent 46695b992c
commit 73caf19e69
11 changed files with 49 additions and 23 deletions

View File

@ -104,7 +104,9 @@ bool
is_valid_func_type(const WASMFuncType *func_type)
{
unsigned i;
for (i = 0; i < func_type->param_count + func_type->result_count; i++) {
for (i = 0;
i < (unsigned)(func_type->param_count + func_type->result_count);
i++) {
if (!is_valid_value_type(func_type->types[i]))
return false;
}

View File

@ -930,13 +930,13 @@ wasm_runtime_enlarge_memory(WASMModuleInstanceCommon *module_inst,
#if WASM_ENABLE_AOT != 0
if (module_inst->module_type == Wasm_Module_AoT) {
return aot_enlarge_memory((AOTModuleInstance *)module_inst,
inc_page_count);
(uint32)inc_page_count);
}
#endif
#if WASM_ENABLE_INTERP != 0
if (module_inst->module_type == Wasm_Module_Bytecode) {
return wasm_enlarge_memory((WASMModuleInstance *)module_inst,
inc_page_count);
(uint32)inc_page_count);
}
#endif