From 522cdab5416071545d29d79b58d1e6828f30e4a0 Mon Sep 17 00:00:00 2001 From: Torbjorn SVENSSON via Newlib Date: Fri, 3 Sep 2021 15:54:10 +0000 Subject: [PATCH] nano-malloc: Fix redefined compilation warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When newlib is configured with --enable-newlib-reent-check-verify, the assert macro is already defined in the nano-mallocr.c compile unit. Contributed by STMicroelectronics Signed-off-by: Torbjörn SVENSSON --- newlib/libc/stdlib/nano-mallocr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/newlib/libc/stdlib/nano-mallocr.c b/newlib/libc/stdlib/nano-mallocr.c index 18a16c924..6fb08a616 100644 --- a/newlib/libc/stdlib/nano-mallocr.c +++ b/newlib/libc/stdlib/nano-mallocr.c @@ -40,6 +40,7 @@ #if DEBUG #include #else +#undef assert #define assert(x) ((void)0) #endif