From 5e0899853b04cb0dfd5e1ce697284f79b045f82f Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 16 Jul 2022 16:37:20 +0300 Subject: [PATCH] dlmalloc: fix warning about fixed arrays of references, by using unsafe{} --- 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 d421f4b62f..46f1bda118 100644 --- a/vlib/dlmalloc/dlmalloc.v +++ b/vlib/dlmalloc/dlmalloc.v @@ -243,8 +243,8 @@ pub fn new(system_allocator Allocator) Dlmalloc { return Dlmalloc{ smallmap: 0 treemap: 0 - smallbins: [(dlmalloc.n_small_bins + 1) * 2]&Chunk{} - treebins: [dlmalloc.n_tree_bins]&TreeChunk{} + smallbins: unsafe { [(dlmalloc.n_small_bins + 1) * 2]&Chunk{} } + treebins: unsafe { [dlmalloc.n_tree_bins]&TreeChunk{} } dvsize: 0 topsize: 0 dv: voidptr(0)