mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-11 12:11:14 +00:00
Fix issue and compilation warnings of new function call APIs (#383)
This commit is contained in:
parent
728890103b
commit
2499e1ec4b
|
@ -11,7 +11,8 @@
|
|||
#define R_X86_64_32 10 /* Direct 32 bit zero extended */
|
||||
#define R_X86_64_32S 11 /* Direct 32 bit sign extended */
|
||||
|
||||
#define IMAGE_REL_AMD64_REL32 4 /* The 32-bit relative address from the byte following the relocation. */
|
||||
#define IMAGE_REL_AMD64_REL32 4 /* The 32-bit relative address from
|
||||
the byte following the relocation */
|
||||
|
||||
void __divdi3();
|
||||
void __udivdi3();
|
||||
|
|
|
@ -868,7 +868,7 @@ parse_args_to_uint32_array(WASMType *type,
|
|||
uint32 num_args, wasm_val_t *args,
|
||||
uint32 *out_argv)
|
||||
{
|
||||
int i, p;
|
||||
uint32 i, p;
|
||||
|
||||
for (i = 0, p = 0; i < num_args; i++) {
|
||||
switch (args[i].kind) {
|
||||
|
@ -911,13 +911,13 @@ parse_uint32_array_to_results(WASMType *type,
|
|||
uint32 argc, uint32 *argv,
|
||||
wasm_val_t *out_results)
|
||||
{
|
||||
int i, p;
|
||||
uint32 i, p;
|
||||
|
||||
for (i = 0, p = 0; i < type->result_count; i++) {
|
||||
switch (type->types[type->param_count + i]) {
|
||||
case VALUE_TYPE_I32:
|
||||
out_results[i].kind = WASM_I32;
|
||||
out_results[i].of.i32 = *(int32 *)argv[p++];
|
||||
out_results[i].of.i32 = (int32)argv[p++];
|
||||
break;
|
||||
case VALUE_TYPE_I64:
|
||||
{
|
||||
|
@ -1008,6 +1008,7 @@ wasm_runtime_call_wasm_a(WASMExecEnv *exec_env,
|
|||
|
||||
ret_num = parse_uint32_array_to_results(type, type->ret_cell_num, argv, results);
|
||||
bh_assert(ret_num == num_results);
|
||||
(void)ret_num;
|
||||
|
||||
fail2:
|
||||
wasm_runtime_free(argv);
|
||||
|
@ -1024,7 +1025,7 @@ wasm_runtime_call_wasm_v(WASMExecEnv *exec_env,
|
|||
wasm_val_t *args = NULL;
|
||||
WASMType *type = NULL;
|
||||
bool ret = false;
|
||||
int i = 0;
|
||||
uint32 i = 0;
|
||||
va_list vargs;
|
||||
|
||||
#if WASM_ENABLE_INTERP != 0
|
||||
|
|
|
@ -1540,7 +1540,7 @@ aot_resolve_target_info(AOTCompContext *comp_ctx, AOTObjectData *obj_data)
|
|||
obj_data->target_info.bin_type = AOT_COFF_BIN_TYPE;
|
||||
}
|
||||
else if (bin_type == LLVMBinaryTypeELF32L
|
||||
|| bin_type == LLVMBinaryTypeELF32B) {
|
||||
|| bin_type == LLVMBinaryTypeELF32B) {
|
||||
struct elf32_ehdr *elf_header;
|
||||
bool is_little_bin = bin_type == LLVMBinaryTypeELF32L;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user