From: Judah Caruso Date: Wed, 13 Dec 2023 16:20:20 +0000 (-0700) Subject: fix remaining warnings (besides semaphore X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=d1903d768320d71e67a4cf78ed44d15f2ccdef2d;p=onyx.git fix remaining warnings (besides semaphore --- 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 2d08d29d..a330b5c3 100644 Binary files a/shared/lib/darwin_arm64/lib/libovmwasm.a and b/shared/lib/darwin_arm64/lib/libovmwasm.a differ