From c5addb5ed4f44d6c405413bf42468705ab12acf6 Mon Sep 17 00:00:00 2001 From: elasota <1137273+elasota@users.noreply.github.com> Date: Wed, 7 Aug 2024 00:19:11 -0400 Subject: [PATCH] Quiet realloc-free warnings --- AerofoilPortable/GpAllocator_C.cpp | 2 +- PortabilityLayer/ScanlineMaskBuilder.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AerofoilPortable/GpAllocator_C.cpp b/AerofoilPortable/GpAllocator_C.cpp index e34be51..7ec3f35 100644 --- a/AerofoilPortable/GpAllocator_C.cpp +++ b/AerofoilPortable/GpAllocator_C.cpp @@ -104,7 +104,7 @@ void GpAllocator_C::Free(void *buf) const GpAllocator_C_MMBlock *mmBlock = reinterpret_cast(bytes - GpAllocator_C_MMBlock::AlignedSize()); void *freeLoc = bytes - GpAllocator_C_MMBlock::AlignedSize() - mmBlock->m_offsetFromAllocLocation; - (void)realloc(freeLoc, 0); + free(freeLoc); } GpAllocator_C *GpAllocator_C::GetInstance() diff --git a/PortabilityLayer/ScanlineMaskBuilder.cpp b/PortabilityLayer/ScanlineMaskBuilder.cpp index 96443df..3bda80a 100644 --- a/PortabilityLayer/ScanlineMaskBuilder.cpp +++ b/PortabilityLayer/ScanlineMaskBuilder.cpp @@ -15,7 +15,7 @@ namespace PortabilityLayer ScanlineMaskBuilder::~ScanlineMaskBuilder() { if (m_spans) - (void)realloc(m_spans, 0); + free(m_spans); } bool ScanlineMaskBuilder::AppendSpan(size_t span)