[PATCH] nano-malloc: Fix redefined compilation warning

Torbjorn SVENSSON via Newlib <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <AM6PR10MB219741776A15EC5658D824D981CF9@AM6PR10MB2197.EURPRD10.PROD.OUTLOOK.COM>
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 <[email protected]>
---
 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 <assert.h>
 #else
+#undef assert
 #define assert(x) ((void)0)
 #endif
 
-- 
2.18.0

ST Restricted
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.