From d40d4be1bdebdc52a6061534d5ed1a76f54a1272 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 15:37:59 -0700 Subject: [PATCH] * alloc.c (Fmemory_limit): Cast sbrk's returned value to char *. --- src/ChangeLog | 1 + src/alloc.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9f8c2166364..d62b1e2464b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -10,6 +10,7 @@ needed otherwise. (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS. (GC_STRING_CHARS): Remove; not used. + (Fmemory_limit): Cast sbrk's returned value to char *. * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this avoids undefined behavior in theory. diff --git a/src/alloc.c b/src/alloc.c index 7fa2790cb1e..6262e002ed3 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -6057,7 +6057,7 @@ We divide the value by 1024 to make sure it fits in a Lisp integer. */) { Lisp_Object end; - XSETINT (end, (EMACS_INT) sbrk (0) / 1024); + XSETINT (end, (EMACS_INT) (char *) sbrk (0) / 1024); return end; } -- 2.39.2