Commit 864c24bd authored by Carl Shapiro's avatar Carl Shapiro
Browse files

Fix compiler warnings in the runtime.

parent 650e76e6
......@@ -484,10 +484,6 @@ in_range_p(os_vm_address_t a, lispobj sbeg, size_t slen)
boolean
valid_addr(os_vm_address_t addr)
{
os_vm_address_t newaddr;
newaddr = os_trunc_to_page(addr);
if (in_range_p(addr, READ_ONLY_SPACE_START, read_only_space_size)
|| in_range_p(addr, STATIC_SPACE_START, static_space_size)
|| in_range_p(addr, DYNAMIC_0_SPACE_START, dynamic_space_size)
......
......@@ -218,10 +218,6 @@ in_range_p(os_vm_address_t a, lispobj sbeg, size_t slen)
boolean
valid_addr(os_vm_address_t addr)
{
os_vm_address_t newaddr;
newaddr = os_trunc_to_page(addr);
if (in_range_p(addr, READ_ONLY_SPACE_START, read_only_space_size)
|| in_range_p(addr, STATIC_SPACE_START, static_space_size)
|| in_range_p(addr, DYNAMIC_0_SPACE_START, dynamic_space_size)
......
......@@ -381,10 +381,6 @@ in_range_p(os_vm_address_t a, lispobj sbeg, size_t slen)
boolean
valid_addr(os_vm_address_t addr)
{
os_vm_address_t newaddr;
newaddr = os_trunc_to_page(addr);
if (in_range_p(addr, READ_ONLY_SPACE_START, read_only_space_size)
|| in_range_p(addr, STATIC_SPACE_START, static_space_size)
|| in_range_p(addr, DYNAMIC_0_SPACE_START, dynamic_space_size)
......
......@@ -271,10 +271,6 @@ in_range_p(os_vm_address_t a, lispobj sbeg, size_t slen)
boolean
valid_addr(os_vm_address_t addr)
{
os_vm_address_t newaddr;
newaddr = os_trunc_to_page(addr);
if (in_range_p(addr, READ_ONLY_SPACE_START, read_only_space_size)
|| in_range_p(addr, STATIC_SPACE_START, static_space_size)
|| in_range_p(addr, DYNAMIC_0_SPACE_START, dynamic_space_size)
......
......@@ -143,11 +143,6 @@ in_range_p(os_vm_address_t a, lispobj sbeg, size_t slen)
boolean
valid_addr(os_vm_address_t addr)
{
int ret;
os_vm_address_t newaddr;
newaddr = os_trunc_to_page(addr);
if (in_range_p(addr, READ_ONLY_SPACE_START, READ_ONLY_SPACE_SIZE)
|| in_range_p(addr, STATIC_SPACE_START, STATIC_SPACE_SIZE)
|| in_range_p(addr, DYNAMIC_0_SPACE_START, dynamic_space_size)
......
......@@ -247,8 +247,7 @@ write_string_section(int fd)
int ret;
if(buffer == NULL) {
write(0, "Out of memory in write_string_section()\n", 40);
perror("Out of memory in write_string_section()");
ret = -1;
} else {
......
......@@ -244,7 +244,9 @@ interrupt_handle_now_handler(HANDLER_ARGS)
void
interrupt_handle_now(HANDLER_ARGS)
{
#if !(defined(i386) || defined(__x86_64))
int were_in_lisp;
#endif
ucontext_t *ucontext = (ucontext_t *) context;
union interrupt_handler handler;
......@@ -256,8 +258,8 @@ interrupt_handle_now(HANDLER_ARGS)
return;
SAVE_CONTEXT();
/**/ were_in_lisp = !foreign_function_call_active;
#if ! (defined(i386) || defined(_x86_64))
were_in_lisp = !foreign_function_call_active;
if (were_in_lisp)
#endif
fake_foreign_function_call(context);
......
......@@ -14,12 +14,11 @@
boolean
search_for_type(int type, lispobj ** start, int *count)
{
lispobj obj, *addr;
lispobj obj;
while ((*count == -1 || (*count > 0)) &&
valid_addr((os_vm_address_t) * start)) {
obj = **start;
addr = *start;
if (*count != -1)
*count -= 2;
......
......@@ -185,11 +185,6 @@ in_range_p(os_vm_address_t a, lispobj sbeg, size_t slen)
boolean valid_addr(os_vm_address_t addr)
{
/* Stolen from Linux-os.c */
os_vm_address_t newaddr;
newaddr = os_trunc_to_page(addr);
/* Just assume address is valid if it lies within one of the known
spaces. (Unlike sunos-os which keeps track of every valid page.) */
return (in_range_p(addr, READ_ONLY_SPACE_START, read_only_space_size)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment