From 81b70107246eb35664944cc3f721e3ab34699ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Thu, 10 Nov 2016 12:19:39 +0100 Subject: [PATCH] Fix some safety annotation issues. --- source/vibe/internal/freelistref.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/vibe/internal/freelistref.d b/source/vibe/internal/freelistref.d index 2b8f479..216e3f3 100644 --- a/source/vibe/internal/freelistref.d +++ b/source/vibe/internal/freelistref.d @@ -106,7 +106,7 @@ struct FreeListRef(T, bool INIT = true) private size_t m_magic = 0x1EE75817; // workaround for compiler bug static FreeListRef opCall(ARGS...)(ARGS args) - @safe { + { //logInfo("refalloc %s/%d", T.stringof, ElemSize); FreeListRef ret; ret.m_object = ObjAlloc.alloc(args); @@ -187,7 +187,7 @@ in { format("emplace: Chunk size too small: %s < %s size = %s", chunk.length, T.stringof, T.sizeof)); assert((cast(size_t) chunk.ptr) % T.alignof == 0, - format("emplace: Misaligned memory block (0x%X): it must be %s-byte aligned for type %s", chunk.ptr, T.alignof, T.stringof)); + format("emplace: Misaligned memory block (0x%X): it must be %s-byte aligned for type %s", &chunk[0], T.alignof, T.stringof)); } body { enum classSize = __traits(classInstanceSize, T); @@ -226,7 +226,7 @@ in { format("emplace: Chunk size too small: %s < %s size = %s", chunk.length, T.stringof, T.sizeof)); assert((cast(size_t) chunk.ptr) % T.alignof == 0, - format("emplace: Misaligned memory block (0x%X): it must be %s-byte aligned for type %s", chunk.ptr, T.alignof, T.stringof)); + format("emplace: Misaligned memory block (0x%X): it must be %s-byte aligned for type %s", &chunk[0], T.alignof, T.stringof)); } body { return emplace(() @trusted { return cast(T*)chunk.ptr; } (), args);