mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-14 16:35:03 +01:00
Detect unused variables
This commit is contained in:
parent
f164aad631
commit
9270f52e6b
33 changed files with 340 additions and 63 deletions
|
|
@ -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);
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue