From d1903d768320d71e67a4cf78ed44d15f2ccdef2d Mon Sep 17 00:00:00 2001 From: Judah Caruso Date: Wed, 13 Dec 2023 09:20:20 -0700 Subject: [PATCH] fix remaining warnings (besides semaphore --- compiler/src/wasm_runtime.c | 4 ++-- interpreter/src/debug/debug_host.c | 3 ++- interpreter/src/vm/vm.c | 2 +- shared/lib/darwin_arm64/lib/libovmwasm.a | Bin 322696 -> 322696 bytes 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/src/wasm_runtime.c b/compiler/src/wasm_runtime.c index e232d8b9..a802e3cc 100644 --- a/compiler/src/wasm_runtime.c +++ b/compiler/src/wasm_runtime.c @@ -241,7 +241,7 @@ static wasm_trap_t *__wasm_dyncall(void *env, const wasm_val_vec_t *args, wasm_v dcArgInt(dcCallVM, args->data[arg_idx++].of.i32); break; - default: assert(("bad dynamic call type", 0)); + default: assert("bad dynamic call type" && 0); } } @@ -652,7 +652,7 @@ b32 onyx_run_wasm(bh_buffer wasm_bytes, int argc, char *argv[]) { #ifdef USE_DYNCALL wasm_runtime.wasm_func_from_idx = wasm_func_from_idx; #endif - + wasm_runtime.argc = argc; wasm_runtime.argv = argv; diff --git a/interpreter/src/debug/debug_host.c b/interpreter/src/debug/debug_host.c index 83312106..505abdb2 100644 --- a/interpreter/src/debug/debug_host.c +++ b/interpreter/src/debug/debug_host.c @@ -19,7 +19,8 @@ void debug_host_init(debug_state_t *debug, struct ovm_engine_t *ovm_engine) { debug->listen_socket_fd = 0; debug->client_fd = 0; - if (pipe(debug->state_change_pipes) != 0) { + int *pipes = (int *)debug->state_change_pipes; + if (pipe(pipes) != 0) { printf("[ERROR] Failed to create thread notification pipes.\n"); } } diff --git a/interpreter/src/vm/vm.c b/interpreter/src/vm/vm.c index cde89285..4e98f756 100644 --- a/interpreter/src/vm/vm.c +++ b/interpreter/src/vm/vm.c @@ -449,7 +449,7 @@ static inline double __ovm_nearest(double f) { else return __ovm_ceil(f); } -static inline double __ovm_copysign(a, b) double a, b; { +static inline double __ovm_copysign(double a, double b) { if ((a > 0 && b > 0) || (a < 0 && b < 0)) return a; return -a; } diff --git a/shared/lib/darwin_arm64/lib/libovmwasm.a b/shared/lib/darwin_arm64/lib/libovmwasm.a index 2d08d29de393dfd684f461f3426dba9892d71af1..a330b5c35d51a9a651f0617cd591de8218702ebb 100644 GIT binary patch delta 345 zcmeCUDco^Wc!CV8iG_)Y!Sq62X333KMh0v^uCb;0<{|?v2N-)%K@kgtZMj*h)QSVf zj;fs{2V?)5T_gZw7p+-k3S%oh;xdM?&9@tgGAb#-I8o+|mslYji|t0XjFY%woKqf* zUYszFR1jkkT-l^>Mk_X$%%xbyQ+hDYq8>&kxSm&28Ko*9GG^Pk_?WtuLpbK!XKiIl z;)Cg7I>K~{3C6i}jOi1cbLu41CuW$;p|ebjpx(FGo^^>S$pj)}x&0Cw^DL-y%-f52 MnYS15vWVRW0K?#6NdN!< delta 368 zcmeCUDco^Wc!CU@ftjU&g~3K8F9R^s+<0@5ftCX+NZ5R$qQvH%1<@=J8Pm;DrB)m; zc2w;wIT-ub>>>deyJ*cSQy5$65tlK9ZM@w`lu=0uZtV6#bH?4QFs}G^4_n3>ZUpy% z2cromj4QF-Fo-c4u2^FG%5X+yHiYcUSjNqIFs}Ia9X*UXaJ}N&rZKWqz}&#a$JDhP zp>o4kCLcZoSKP}!b!i7CkhCUc36c^2Gl QlI>l*%-g$oS^nJv0P6#1j{pDw -- 2.25.1