From 725456cde006581a0f5a8ad39e32b263124a0b14 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 6 Jan 2023 14:55:01 +0200 Subject: [PATCH] ci: fix warnings in `v -cc gcc -keepc -freestanding -o bel vlib/os/bare/bare_example_linux.v` --- vlib/dlmalloc/dlmalloc.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/dlmalloc/dlmalloc.v b/vlib/dlmalloc/dlmalloc.v index 4ec5e204a..3e7527d03 100644 --- a/vlib/dlmalloc/dlmalloc.v +++ b/vlib/dlmalloc/dlmalloc.v @@ -385,7 +385,7 @@ fn chunk_from_mem(mem_ voidptr) &Chunk { } fn (tree &TreeChunk) leftmost_child() &TreeChunk { - left := &TreeChunk(tree.child[0]) + left := unsafe { &TreeChunk(tree.child[0]) } if isnil(left) { return tree.child[1] } else { @@ -1547,7 +1547,7 @@ fn (mut dl Dlmalloc) mmap_resize(oldp_ &Chunk, nb usize, can_move bool) &Chunk { return unsafe { nil } } - mut newp := &Chunk(voidptr(usize(ptr) + offset)) + mut newp := unsafe { &Chunk(voidptr(usize(ptr) + offset)) } psize := newmmsize - offset - mmap_foot_pad() newp.head = psize newp.plus_offset(psize).head = fencepost_head() -- 2.30.2