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) ...@@ -484,10 +484,6 @@ in_range_p(os_vm_address_t a, lispobj sbeg, size_t slen)
boolean boolean
valid_addr(os_vm_address_t addr) 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) 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, STATIC_SPACE_START, static_space_size)
|| in_range_p(addr, DYNAMIC_0_SPACE_START, dynamic_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) ...@@ -218,10 +218,6 @@ in_range_p(os_vm_address_t a, lispobj sbeg, size_t slen)
boolean boolean
valid_addr(os_vm_address_t addr) 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) 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, STATIC_SPACE_START, static_space_size)
|| in_range_p(addr, DYNAMIC_0_SPACE_START, dynamic_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) ...@@ -381,10 +381,6 @@ in_range_p(os_vm_address_t a, lispobj sbeg, size_t slen)
boolean boolean
valid_addr(os_vm_address_t addr) 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) 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, STATIC_SPACE_START, static_space_size)
|| in_range_p(addr, DYNAMIC_0_SPACE_START, dynamic_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) ...@@ -271,10 +271,6 @@ in_range_p(os_vm_address_t a, lispobj sbeg, size_t slen)
boolean boolean
valid_addr(os_vm_address_t addr) 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) 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, STATIC_SPACE_START, static_space_size)
|| in_range_p(addr, DYNAMIC_0_SPACE_START, dynamic_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) ...@@ -143,11 +143,6 @@ in_range_p(os_vm_address_t a, lispobj sbeg, size_t slen)
boolean boolean
valid_addr(os_vm_address_t addr) 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) 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, STATIC_SPACE_START, STATIC_SPACE_SIZE)
|| in_range_p(addr, DYNAMIC_0_SPACE_START, dynamic_space_size) || in_range_p(addr, DYNAMIC_0_SPACE_START, dynamic_space_size)
......
...@@ -247,8 +247,7 @@ write_string_section(int fd) ...@@ -247,8 +247,7 @@ write_string_section(int fd)
int ret; int ret;
if(buffer == NULL) { if(buffer == NULL) {
perror("Out of memory in write_string_section()");
write(0, "Out of memory in write_string_section()\n", 40);
ret = -1; ret = -1;
} else { } else {
......
...@@ -244,7 +244,9 @@ interrupt_handle_now_handler(HANDLER_ARGS) ...@@ -244,7 +244,9 @@ interrupt_handle_now_handler(HANDLER_ARGS)
void void
interrupt_handle_now(HANDLER_ARGS) interrupt_handle_now(HANDLER_ARGS)
{ {
#if !(defined(i386) || defined(__x86_64))
int were_in_lisp; int were_in_lisp;
#endif
ucontext_t *ucontext = (ucontext_t *) context; ucontext_t *ucontext = (ucontext_t *) context;
union interrupt_handler handler; union interrupt_handler handler;
...@@ -256,8 +258,8 @@ interrupt_handle_now(HANDLER_ARGS) ...@@ -256,8 +258,8 @@ interrupt_handle_now(HANDLER_ARGS)
return; return;
SAVE_CONTEXT(); SAVE_CONTEXT();
/**/ were_in_lisp = !foreign_function_call_active;
#if ! (defined(i386) || defined(_x86_64)) #if ! (defined(i386) || defined(_x86_64))
were_in_lisp = !foreign_function_call_active;
if (were_in_lisp) if (were_in_lisp)
#endif #endif
fake_foreign_function_call(context); fake_foreign_function_call(context);
......
...@@ -14,12 +14,11 @@ ...@@ -14,12 +14,11 @@
boolean boolean
search_for_type(int type, lispobj ** start, int *count) search_for_type(int type, lispobj ** start, int *count)
{ {
lispobj obj, *addr; lispobj obj;
while ((*count == -1 || (*count > 0)) && while ((*count == -1 || (*count > 0)) &&
valid_addr((os_vm_address_t) * start)) { valid_addr((os_vm_address_t) * start)) {
obj = **start; obj = **start;
addr = *start;
if (*count != -1) if (*count != -1)
*count -= 2; *count -= 2;
......
...@@ -185,11 +185,6 @@ in_range_p(os_vm_address_t a, lispobj sbeg, size_t slen) ...@@ -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) 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 /* Just assume address is valid if it lies within one of the known
spaces. (Unlike sunos-os which keeps track of every valid page.) */ spaces. (Unlike sunos-os which keeps track of every valid page.) */
return (in_range_p(addr, READ_ONLY_SPACE_START, read_only_space_size) 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