diff --git a/extras/memory/src/unity_memory.c b/extras/memory/src/unity_memory.c index e112e8d564288cd523b62fed297790160432ed36..e4dc6654f3d2e18c67d7c9d20ac7a1efc6242f71 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