This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH] Do not compare pointer to int
- From: "Jaap de Wolff" <info at jasoon dot nl>
- To: <newlib at sourceware dot org>
- Date: Fri, 9 Feb 2018 09:42:42 +0100
- Subject: [PATCH] Do not compare pointer to int
- Authentication-results: sourceware.org; auth=none
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. */