diff options
author | Andreas Schwab <schwab@suse.de> | 2003-09-07 19:15:51 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2003-09-07 19:15:51 +0000 |
commit | 03bb6a06e1af95f7540a3f11a92dbefea0894804 (patch) | |
tree | 86c83b7d8d94c783d1135780aed21bafb108b253 | |
parent | 2063d89c11c5dbc3b84caf88546c9a088da421b3 (diff) | |
download | emacs-03bb6a06e1af95f7540a3f11a92dbefea0894804.tar.gz emacs-03bb6a06e1af95f7540a3f11a92dbefea0894804.tar.bz2 emacs-03bb6a06e1af95f7540a3f11a92dbefea0894804.zip |
Use long instead of int when casting ABLOCKS_BUSY to
avoid warning.
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/alloc.c | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5a7dd1962b0..660e74e5a03 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-09-07 Andreas Schwab <schwab@suse.de> + + * alloc.c: Use long instead of int when casting ABLOCKS_BUSY to + avoid warning. + 2003-09-07 Eli Zaretskii <eliz@elta.co.il> * editfns.c (region_limit): Support any non-zero value of diff --git a/src/alloc.c b/src/alloc.c index f73edcd70e9..332e63c4fd2 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -711,7 +711,7 @@ struct ablocks #define ABLOCKS_BASE(abase) (abase) #else #define ABLOCKS_BASE(abase) \ - (1 & (int) ABLOCKS_BUSY (abase) ? abase : ((void**)abase)[-1]) + (1 & (long) ABLOCKS_BUSY (abase) ? abase : ((void**)abase)[-1]) #endif /* The list of free ablock. */ @@ -792,17 +792,17 @@ lisp_align_malloc (nbytes, type) abase->blocks[i].x.next_free = free_ablock; free_ablock = &abase->blocks[i]; } - ABLOCKS_BUSY (abase) = (struct ablocks *) aligned; + ABLOCKS_BUSY (abase) = (struct ablocks *) (long) aligned; eassert (0 == ((EMACS_UINT)abase) % BLOCK_ALIGN); eassert (ABLOCK_ABASE (&abase->blocks[3]) == abase); /* 3 is arbitrary */ eassert (ABLOCK_ABASE (&abase->blocks[0]) == abase); eassert (ABLOCKS_BASE (abase) == base); - eassert (aligned == (int)ABLOCKS_BUSY (abase)); + eassert (aligned == (long) ABLOCKS_BUSY (abase)); } abase = ABLOCK_ABASE (free_ablock); - ABLOCKS_BUSY (abase) = (struct ablocks *) (2 + (int) ABLOCKS_BUSY (abase)); + ABLOCKS_BUSY (abase) = (struct ablocks *) (2 + (long) ABLOCKS_BUSY (abase)); val = free_ablock; free_ablock = free_ablock->x.next_free; @@ -834,11 +834,11 @@ lisp_align_free (block) ablock->x.next_free = free_ablock; free_ablock = ablock; /* Update busy count. */ - ABLOCKS_BUSY (abase) = (struct ablocks *) (-2 + (int) ABLOCKS_BUSY (abase)); + ABLOCKS_BUSY (abase) = (struct ablocks *) (-2 + (long) ABLOCKS_BUSY (abase)); - if (2 > (int) ABLOCKS_BUSY (abase)) + if (2 > (long) ABLOCKS_BUSY (abase)) { /* All the blocks are free. */ - int i = 0, aligned = (int) ABLOCKS_BUSY (abase); + int i = 0, aligned = (long) ABLOCKS_BUSY (abase); struct ablock **tem = &free_ablock; struct ablock *atop = &abase->blocks[aligned ? ABLOCKS_SIZE : ABLOCKS_SIZE - 1]; |