* alloc.c (Fmemory_limit): Cast sbrk's returned value to char *.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 15 Mar 2011 22:37:59 +0000 (15:37 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 15 Mar 2011 22:37:59 +0000 (15:37 -0700)
src/ChangeLog
src/alloc.c

index 9f8c216..d62b1e2 100644 (file)
@@ -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.
index 7fa2790..6262e00 100644 (file)
@@ -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;
 }