[PATCH 08/25] Avoid need for -fno-builtin for calloc()

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Sep 14 13:18:36 UTC 2018


Use RTEMS_OBFUSCATE_VARIABLE() instead.
---
 cpukit/libcsupport/src/calloc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cpukit/libcsupport/src/calloc.c b/cpukit/libcsupport/src/calloc.c
index 915ece3e17..20db533786 100644
--- a/cpukit/libcsupport/src/calloc.c
+++ b/cpukit/libcsupport/src/calloc.c
@@ -21,6 +21,7 @@
 #if defined(RTEMS_NEWLIB) && !defined(HAVE_CALLOC)
 #include <stdlib.h>
 #include <string.h>
+#include <rtems/score/basedefs.h>
 
 void *calloc(
   size_t nelem,
@@ -32,6 +33,7 @@ void *calloc(
 
   length = nelem * elsize;
   cptr = malloc( length );
+  RTEMS_OBFUSCATE_VARIABLE( cptr );
   if ( cptr )
     memset( cptr, '\0', length );
 
-- 
2.13.7



More information about the devel mailing list