1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: fix warnings in v -cc gcc -keepc -freestanding -o bel vlib/os/bare/bare_example_linux.v

This commit is contained in:
Delyan Angelov 2023-01-06 14:55:01 +02:00
parent 2119a240e8
commit 725456cde0
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -385,7 +385,7 @@ fn chunk_from_mem(mem_ voidptr) &Chunk {
} }
fn (tree &TreeChunk) leftmost_child() &TreeChunk { fn (tree &TreeChunk) leftmost_child() &TreeChunk {
left := &TreeChunk(tree.child[0]) left := unsafe { &TreeChunk(tree.child[0]) }
if isnil(left) { if isnil(left) {
return tree.child[1] return tree.child[1]
} else { } else {
@ -1547,7 +1547,7 @@ fn (mut dl Dlmalloc) mmap_resize(oldp_ &Chunk, nb usize, can_move bool) &Chunk {
return unsafe { nil } return unsafe { nil }
} }
mut newp := &Chunk(voidptr(usize(ptr) + offset)) mut newp := unsafe { &Chunk(voidptr(usize(ptr) + offset)) }
psize := newmmsize - offset - mmap_foot_pad() psize := newmmsize - offset - mmap_foot_pad()
newp.head = psize newp.head = psize
newp.plus_offset(psize).head = fencepost_head() newp.plus_offset(psize).head = fencepost_head()