This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Do not compare pointer to int


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.  */



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]