From: Paul Eggert Date: Tue, 15 Mar 2011 22:37:59 +0000 (-0700) Subject: * alloc.c (Fmemory_limit): Cast sbrk's returned value to char *. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~554^2~51 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d40d4be1bdebdc52a6061534d5ed1a76f54a1272;p=emacs.git * alloc.c (Fmemory_limit): Cast sbrk's returned value to char *. --- 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; }