[PATCH] nano-malloc: Fix redefined compilation warning
Torbjorn SVENSSON
torbjorn.svensson@st.com
Fri Sep 3 15:54:10 GMT 2021
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 <torbjorn.svensson@st.com>
---
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
More information about the Newlib
mailing list