[PATCH] Do not compare pointer to int

Jaap de Wolff info@jasoon.nl
Fri Feb 9 08:42:00 GMT 2018


In syscalls was a pointer to int comparison

Jaap de Wolff

diff --git a/libgloss/arm/syscalls.c b/libgloss/arm/syscalls.c
index 5548dcfb3..51d2bedde 100644
--- a/libgloss/arm/syscalls.c
+++ b/libgloss/arm/syscalls.c
@@ -718,7 +718,7 @@ _sbrk (int incr)
   
   if ((heap_end + incr > stack_ptr)
       /* Honour heap limit if it's valid.  */
-      || (__heap_limit != 0xcafedead && heap_end + incr > __heap_limit))
+      || (__heap_limit != 0xcafedead && heap_end + incr > (char
*)__heap_limit))
     {
       /* Some of the libstdc++-v3 tests rely upon detecting
 	 out of memory errors, so do not abort here.  */




More information about the Newlib mailing list