Detect unused variables

This commit is contained in:
nora 2024-05-13 20:02:08 +02:00
parent f164aad631
commit 9270f52e6b
33 changed files with 340 additions and 63 deletions

View file

@ -2,5 +2,6 @@ import ("wasi_snapshot_preview1" "fd_write")
fd_write(fd: I32, ciovec_ptr: I32, ciovec_len: I32, out_ptr: I32): I32;
function print(s: String) = (
let s: (I32, I32) = ___transmute(s);
// TODO: do it
let _s: (I32, I32) = ___transmute(s);
);

View file

@ -29,7 +29,7 @@ function allocate(size: I32, align: I32): I32 = (
alignedPtr
);
function deallocate(ptr: I32, size: I32) = (
function deallocate(_ptr: I32, _size: I32) = (
std.println("uwu deawwocate :3");
);

View file

@ -1,6 +1,7 @@
mod alloc;
function memcpy(dst: I32, src: I32, n: I32) =
// The function parameters are not actually unused.
function memcpy(_dst: I32, _src: I32, _n: I32) =
___asm(
__locals(),
"local.get 2",