aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-03-15 15:37:59 -0700
committerPaul Eggert2011-03-15 15:37:59 -0700
commitd40d4be1bdebdc52a6061534d5ed1a76f54a1272 (patch)
treeb360c5572093c01393cf731e3f57b0e6b30b8245 /src
parent7bc26fdb5c3b50b29bff966a55394e730fbfadd8 (diff)
downloademacs-d40d4be1bdebdc52a6061534d5ed1a76f54a1272.tar.gz
emacs-d40d4be1bdebdc52a6061534d5ed1a76f54a1272.zip
* alloc.c (Fmemory_limit): Cast sbrk's returned value to char *.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog1
-rw-r--r--src/alloc.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9f8c2166364..d62b1e2464b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -10,6 +10,7 @@
10 needed otherwise. 10 needed otherwise.
11 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS. 11 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
12 (GC_STRING_CHARS): Remove; not used. 12 (GC_STRING_CHARS): Remove; not used.
13 (Fmemory_limit): Cast sbrk's returned value to char *.
13 14
14 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this 15 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
15 avoids undefined behavior in theory. 16 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. */)
6057{ 6057{
6058 Lisp_Object end; 6058 Lisp_Object end;
6059 6059
6060 XSETINT (end, (EMACS_INT) sbrk (0) / 1024); 6060 XSETINT (end, (EMACS_INT) (char *) sbrk (0) / 1024);
6061 6061
6062 return end; 6062 return end;
6063} 6063}