warning diagnostics for unused locals
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
mem :: import ".."
|
||||
|
||||
alloc func(size usize) ?*mut u8 {
|
||||
return mem.alloc(mem.heap, size, 1)
|
||||
}
|
||||
|
||||
free func(memory ?*mut u8) void {
|
||||
mem.free(mem.heap, memory, 0, 1)
|
||||
}
|
||||
+2
-2
@@ -8,10 +8,10 @@ Allocator :: struct {
|
||||
|
||||
heap Allocator :: Allocator {
|
||||
context = none,
|
||||
alloc = func(context ?*mut anyopaque, size usize, alignment usize) ?*mut u8 {
|
||||
alloc = func(_ ?*mut anyopaque, size usize, _ usize) ?*mut u8 {
|
||||
return ptr_cast(u8, c.malloc(size))
|
||||
},
|
||||
free = func(context ?*mut anyopaque, memory ?*mut u8, size usize, alignment usize) void {
|
||||
free = func(_ ?*mut anyopaque, memory ?*mut u8, _ usize, _ usize) void {
|
||||
c.free(memory)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user