From 5dd59311148c19af7ce27a4f61d293781a589175 Mon Sep 17 00:00:00 2001 From: mvandervoord Date: Wed, 30 Oct 2019 08:53:08 -0400 Subject: [PATCH] Try to keep compiler from complaining about this cast that we KNOW is okay. --- extras/memory/src/unity_memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extras/memory/src/unity_memory.c b/extras/memory/src/unity_memory.c index e112e8d..e4dc665 100644 --- a/extras/memory/src/unity_memory.c +++ b/extras/memory/src/unity_memory.c @@ -87,7 +87,8 @@ void* unity_malloc(size_t size) } else { - guard = (Guard*)&unity_heap[heap_index]; + /* We know we can get away with this cast because we aligned memory already */ + guard = (Guard*)(void*)(&unity_heap[heap_index]); heap_index += total_size; } #else -- GitLab