Skip to content
Snippets Groups Projects
Commit c66586ed authored by dtc's avatar dtc
Browse files

Cleanup compiler warnings.

parent 431ad6a7
No related branches found
No related tags found
No related merge requests found
/* /*
$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/arch.h,v 1.4 1994/10/27 17:13:54 ram Exp $ $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/arch.h,v 1.5 2000/10/27 19:25:54 dtc Exp $
This code was written as part of the CMU Common Lisp project at This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University, and has been placed in the public domain. Carnegie Mellon University, and has been placed in the public domain.
...@@ -30,4 +30,7 @@ extern lispobj funcall2(lispobj function, lispobj arg0, lispobj arg1); ...@@ -30,4 +30,7 @@ extern lispobj funcall2(lispobj function, lispobj arg0, lispobj arg1);
extern lispobj funcall3(lispobj function, lispobj arg0, lispobj arg1, extern lispobj funcall3(lispobj function, lispobj arg0, lispobj arg1,
lispobj arg2); lispobj arg2);
extern void fpu_save(void *);
extern void fpu_restore(void *);
#endif /* __ARCH_H__ */ #endif /* __ARCH_H__ */
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/backtrace.c,v 1.4 1994/10/25 17:31:52 ram Exp $ /* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/backtrace.c,v 1.5 2000/10/27 19:25:54 dtc Exp $
* *
* Simple backtrace facility. More or less from Rob's lisp version. * Simple backtrace facility. More or less from Rob's lisp version.
*/ */
...@@ -245,9 +245,7 @@ backtrace(int nframes) ...@@ -245,9 +245,7 @@ backtrace(int nframes)
#else #else
void void backtrace(int nframes)
backtrace(nframes)
int nframes;
{ {
printf("Can't backtrace on this hardware platform.\n"); printf("Can't backtrace on this hardware platform.\n");
} }
......
/* /*
$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/breakpoint.c,v 1.11 2000/09/05 08:51:51 dtc Exp $ $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/breakpoint.c,v 1.12 2000/10/27 19:25:54 dtc Exp $
This code was written as part of the CMU Common Lisp project at This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University, and has been placed in the public domain. Carnegie Mellon University, and has been placed in the public domain.
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
#include "globals.h" #include "globals.h"
#include "alloc.h" #include "alloc.h"
#include "breakpoint.h" #include "breakpoint.h"
#if defined GENCGC
#include "gencgc.h"
#endif
#define REAL_LRA_SLOT 0 #define REAL_LRA_SLOT 0
#ifndef i386 #ifndef i386
...@@ -82,12 +85,12 @@ static lispobj find_code(struct sigcontext *scp) ...@@ -82,12 +85,12 @@ static lispobj find_code(struct sigcontext *scp)
#ifdef i386 #ifdef i386
static lispobj find_code(struct sigcontext *scp) static lispobj find_code(struct sigcontext *scp)
{ {
lispobj codeptr = component_ptr_from_pc(SC_PC(scp)); lispobj *codeptr = component_ptr_from_pc(SC_PC(scp));
if (codeptr == NULL) if (codeptr == NULL)
return NIL; return NIL;
else else
return codeptr + type_OtherPointer; return (lispobj) codeptr | type_OtherPointer;
} }
#endif #endif
......
...@@ -7,20 +7,21 @@ ...@@ -7,20 +7,21 @@
* *
* Douglas Crosher, 1996, 1997, 1998, 1999. * Douglas Crosher, 1996, 1997, 1998, 1999.
* *
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/gencgc.c,v 1.23 2000/10/24 13:32:31 dtc Exp $ * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/gencgc.c,v 1.24 2000/10/27 19:25:55 dtc Exp $
* *
*/ */
#include <stdio.h> #include <stdio.h>
#include <signal.h> #include <signal.h>
#include "lisp.h" #include "lisp.h"
#include "arch.h"
#include "internals.h" #include "internals.h"
#include "os.h" #include "os.h"
#include "globals.h" #include "globals.h"
#include "interrupt.h" #include "interrupt.h"
#include "validate.h" #include "validate.h"
#include "lispregs.h" #include "lispregs.h"
#include "interr.h"
#include "gencgc.h" #include "gencgc.h"
#define gc_abort() lose("GC invariant lost! File \"%s\", line %d\n", \ #define gc_abort() lose("GC invariant lost! File \"%s\", line %d\n", \
...@@ -4194,7 +4195,7 @@ static lispobj* search_static_space(lispobj *pointer) ...@@ -4194,7 +4195,7 @@ static lispobj* search_static_space(lispobj *pointer)
* Faster version for searching the dynamic space. This will work even * Faster version for searching the dynamic space. This will work even
* if the object is in a current allocation region. * if the object is in a current allocation region.
*/ */
lispobj* search_dynamic_space(lispobj *pointer) lispobj *search_dynamic_space(lispobj *pointer)
{ {
int page_index = find_page_index(pointer); int page_index = find_page_index(pointer);
lispobj *start; lispobj *start;
...@@ -5810,7 +5811,7 @@ static void garbage_collect_generation(int generation, int raise) ...@@ -5810,7 +5811,7 @@ static void garbage_collect_generation(int generation, int raise)
(lispobj *) SymbolValue(BINDING_STACK_POINTER) - binding_stack); (lispobj *) SymbolValue(BINDING_STACK_POINTER) - binding_stack);
/* /*
* Scavenge the scavenge_hooks in case this refers to a hooks added * Scavenge the scavenge_hooks in case this refers to a hook added
* in a prior generation GC. From here on the scavenger_hook will * in a prior generation GC. From here on the scavenger_hook will
* only be updated with hooks already scavenged so this only needs * only be updated with hooks already scavenged so this only needs
* doing here. * doing here.
...@@ -5979,7 +5980,7 @@ void collect_garbage(unsigned last_gen) ...@@ -5979,7 +5980,7 @@ void collect_garbage(unsigned last_gen)
if (gencgc_verbose > 1) if (gencgc_verbose > 1)
print_generation_stats(0); print_generation_stats(0);
scavenger_hooks = (struct scavenger_hook *) NIL; scavenger_hooks = NIL;
do { do {
/* Collect the generation */ /* Collect the generation */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* Douglas Crosher, 1996, 1997. * Douglas Crosher, 1996, 1997.
* *
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/gencgc.h,v 1.5 2000/10/24 13:32:32 dtc Exp $ * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/gencgc.h,v 1.6 2000/10/27 19:25:55 dtc Exp $
* *
*/ */
...@@ -152,8 +152,11 @@ extern struct alloc_region unboxed_region; ...@@ -152,8 +152,11 @@ extern struct alloc_region unboxed_region;
void gencgc_pickup_dynamic(void); void gencgc_pickup_dynamic(void);
void sniff_code_object(struct code *code, unsigned displacement); void sniff_code_object(struct code *code, unsigned displacement);
lispobj *search_dynamic_space(lispobj *pointer);
void update_x86_dynamic_space_free_pointer(void); void update_x86_dynamic_space_free_pointer(void);
lispobj * component_ptr_from_pc(lispobj *pc);
void gc_alloc_update_page_tables(int unboxed, void gc_alloc_update_page_tables(int unboxed,
struct alloc_region *alloc_region); struct alloc_region *alloc_region);
#endif _GENCGC_H_ #endif _GENCGC_H_
/* /*
* main() entry point for a stand alone lisp image. * main() entry point for a stand alone lisp image.
* *
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.21 2000/10/24 17:45:57 dtc Exp $ * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.22 2000/10/27 19:25:55 dtc Exp $
* *
*/ */
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "gc.h" #include "gc.h"
#include "monitor.h" #include "monitor.h"
#include "validate.h" #include "validate.h"
#include "interr.h"
#if defined GENCGC #if defined GENCGC
#include "gencgc.h" #include "gencgc.h"
#endif #endif
......
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/monitor.c,v 1.11 1999/02/22 11:41:10 dtc Exp $ */ /* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/monitor.c,v 1.12 2000/10/27 19:25:55 dtc Exp $ */
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
#include "gc.h" #include "gc.h"
#include "search.h" #include "search.h"
#include "purify.h" #include "purify.h"
#if defined GENCGC
#include "gencgc.h"
#endif
extern boolean isatty(int fd); extern boolean isatty(int fd);
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
and x86/GENCGC stack scavenging, by Douglas Crosher, 1996, 1997, and x86/GENCGC stack scavenging, by Douglas Crosher, 1996, 1997,
1998. 1998.
$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/purify.c,v 1.19 2000/10/24 13:32:32 dtc Exp $ $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/purify.c,v 1.20 2000/10/27 19:25:55 dtc Exp $
*/ */
#include <stdio.h> #include <stdio.h>
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "lisp.h" #include "lisp.h"
#include "arch.h"
#include "os.h" #include "os.h"
#include "internals.h" #include "internals.h"
#include "globals.h" #include "globals.h"
...@@ -414,28 +415,34 @@ lispobj *valid_stack_ra_locations[MAX_STACK_RETURN_ADDRESSES]; ...@@ -414,28 +415,34 @@ lispobj *valid_stack_ra_locations[MAX_STACK_RETURN_ADDRESSES];
lispobj *valid_stack_ra_code_objects[MAX_STACK_RETURN_ADDRESSES]; lispobj *valid_stack_ra_code_objects[MAX_STACK_RETURN_ADDRESSES];
unsigned int num_valid_stack_ra_locations; unsigned int num_valid_stack_ra_locations;
/* Identify valid stack slots. */ /*
static void * Identify valid stack slots.
setup_i386_stack_scav(lispobj *lowaddr, lispobj *base) */
static void setup_i386_stack_scav(lispobj *lowaddr, lispobj *base)
{ {
lispobj *sp = lowaddr; lispobj *sp = lowaddr;
num_valid_stack_locations = 0; num_valid_stack_locations = 0;
num_valid_stack_ra_locations = 0; num_valid_stack_ra_locations = 0;
for (sp = lowaddr; sp < base; sp++) { for (sp = lowaddr; sp < base; sp++) {
lispobj thing = *sp; lispobj thing = *sp;
lispobj* start_addr; lispobj* start_addr;
/* Find the object start address */ /* Find the object start address */
if ((start_addr = search_dynamic_space((void *)thing)) != NULL) { if ((start_addr = search_dynamic_space((void *) thing)) != NULL) {
/* Need to allow raw pointers into Code objects for return /*
addresses. This will also pickup pointers to functions in code * Need to allow raw pointers into Code objects for return
objects. */ * addresses. This will also pickup pointers to functions in code
* objects.
*/
if (TypeOf(*start_addr) == type_CodeHeader) { if (TypeOf(*start_addr) == type_CodeHeader) {
gc_assert(num_valid_stack_ra_locations < MAX_STACK_RETURN_ADDRESSES); gc_assert(num_valid_stack_ra_locations < MAX_STACK_RETURN_ADDRESSES);
valid_stack_ra_locations[num_valid_stack_ra_locations] = sp; valid_stack_ra_locations[num_valid_stack_ra_locations] = sp;
valid_stack_ra_code_objects[num_valid_stack_ra_locations++] = valid_stack_ra_code_objects[num_valid_stack_ra_locations++] =
(lispobj *)((int)start_addr + type_OtherPointer); (lispobj *) ((int) start_addr + type_OtherPointer);
} else { } else {
if (valid_dynamic_space_pointer((void *)thing, start_addr)) { if (valid_dynamic_space_pointer((void *) thing, start_addr)) {
gc_assert(num_valid_stack_locations < MAX_STACK_POINTERS); gc_assert(num_valid_stack_locations < MAX_STACK_POINTERS);
valid_stack_locations[num_valid_stack_locations++] = sp; valid_stack_locations[num_valid_stack_locations++] = sp;
} }
...@@ -450,8 +457,7 @@ setup_i386_stack_scav(lispobj *lowaddr, lispobj *base) ...@@ -450,8 +457,7 @@ setup_i386_stack_scav(lispobj *lowaddr, lispobj *base)
} }
} }
static void static void pscav_i386_stack(void)
pscav_i386_stack(void)
{ {
int i; int i;
...@@ -462,14 +468,14 @@ pscav_i386_stack(void) ...@@ -462,14 +468,14 @@ pscav_i386_stack(void)
lispobj code_obj = valid_stack_ra_code_objects[i]; lispobj code_obj = valid_stack_ra_code_objects[i];
pscav(&code_obj, 1, FALSE); pscav(&code_obj, 1, FALSE);
if (pointer_filter_verbose) if (pointer_filter_verbose)
fprintf(stderr,"*C moved RA %x to %x; for code object %x to %x\n", fprintf(stderr, "*C moved RA %x to %x; for code object %x to %x\n",
*valid_stack_ra_locations[i], *valid_stack_ra_locations[i],
(int)(*valid_stack_ra_locations[i]) (int) (*valid_stack_ra_locations[i])
- ((int)valid_stack_ra_code_objects[i] - (int)code_obj), - ((int) valid_stack_ra_code_objects[i] - (int)code_obj),
valid_stack_ra_code_objects[i], code_obj); valid_stack_ra_code_objects[i], code_obj);
*valid_stack_ra_locations[i] = *valid_stack_ra_locations[i] =
(lispobj *)((int)(*valid_stack_ra_locations[i]) (lispobj *)((int) (*valid_stack_ra_locations[i])
- ((int)valid_stack_ra_code_objects[i] - (int)code_obj)); - ((int) valid_stack_ra_code_objects[i] - (int) code_obj));
} }
} }
#endif #endif
...@@ -1137,7 +1143,7 @@ static struct scavenger_hook *scavenger_hooks=NIL; ...@@ -1137,7 +1143,7 @@ static struct scavenger_hook *scavenger_hooks=NIL;
static int pscav_scavenger_hook(struct scavenger_hook *scav_hook) static int pscav_scavenger_hook(struct scavenger_hook *scav_hook)
{ {
lispobj *old_value = scav_hook->value; lispobj old_value = scav_hook->value;
/* Scavenge the value */ /* Scavenge the value */
pscav((lispobj *)scav_hook+1, 1, FALSE); pscav((lispobj *)scav_hook+1, 1, FALSE);
......
/* /*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/runprog.c,v 1.2 1994/10/25 00:12:10 ram Exp $ * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/runprog.c,v 1.3 2000/10/27 19:25:56 dtc Exp $
* *
* Support for run-program. * Support for run-program.
* *
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <sys/file.h> #include <sys/file.h>
#include <sys/fcntl.h> #include <sys/fcntl.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#ifdef SVR4 #if defined(SVR4) || defined(__linux__)
#include <unistd.h> #include <unistd.h>
#endif #endif
...@@ -24,7 +24,7 @@ int spawn(char *program, char *argv[], char *envp[], char *pty_name, ...@@ -24,7 +24,7 @@ int spawn(char *program, char *argv[], char *envp[], char *pty_name,
/* Put us in our own process group. */ /* Put us in our own process group. */
#if defined(hpux) #if defined(hpux)
setsid(); setsid();
#elif defined(SVR4) #elif defined(SVR4) || defined(__linux__)
setpgrp(); setpgrp();
#else #else
setpgrp(0, getpid()); setpgrp(0, getpid());
......
/* /*
$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/save.c,v 1.6 1997/11/25 17:59:14 dtc Exp $ $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/save.c,v 1.7 2000/10/27 19:25:56 dtc Exp $
This code was written as part of the CMU Common Lisp project at This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University, and has been placed in the public domain. Carnegie Mellon University, and has been placed in the public domain.
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "save.h" #include "save.h"
#include "lispregs.h" #include "lispregs.h"
#include "validate.h" #include "validate.h"
#include "dynbind.h"
#ifdef GENCGC #ifdef GENCGC
#include "gencgc.h" #include "gencgc.h"
...@@ -72,7 +73,7 @@ static void output_space(FILE *file, int id, lispobj *addr, lispobj *end) ...@@ -72,7 +73,7 @@ static void output_space(FILE *file, int id, lispobj *addr, lispobj *end)
data = write_bytes(file, (char *)addr, bytes); data = write_bytes(file, (char *)addr, bytes);
putw(data, file); putw(data, file);
putw((os_vm_address_t)((long)addr / CORE_PAGESIZE), file); putw((long) addr / CORE_PAGESIZE, file);
putw((bytes + CORE_PAGESIZE - 1) / CORE_PAGESIZE, file); putw((bytes + CORE_PAGESIZE - 1) / CORE_PAGESIZE, file);
} }
......
/* /*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/validate.c,v 1.7 2000/10/24 13:32:32 dtc Exp $ * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/validate.c,v 1.8 2000/10/27 19:25:56 dtc Exp $
* *
* Memory Validation * Memory Validation
*/ */
...@@ -63,9 +63,9 @@ void validate(void) ...@@ -63,9 +63,9 @@ void validate(void)
current_dynamic_space = dynamic_0_space; current_dynamic_space = dynamic_0_space;
#ifndef GENCGC
/* Dynamic-1 Space */ /* Dynamic-1 Space */
dynamic_1_space = (lispobj *) DYNAMIC_1_SPACE_START; dynamic_1_space = (lispobj *) DYNAMIC_1_SPACE_START;
#ifndef GENCGC
ensure_space(dynamic_1_space, dynamic_space_size); ensure_space(dynamic_1_space, dynamic_space_size);
#endif #endif
......
/* x86-arch.c -*- Mode: C; comment-column: 40 -*- /* x86-arch.c -*- Mode: C; comment-column: 40 -*-
* *
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/x86-arch.c,v 1.13 2000/10/21 12:42:46 dtc Exp $ * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/x86-arch.c,v 1.14 2000/10/27 19:25:56 dtc Exp $
* *
*/ */
...@@ -55,7 +55,7 @@ void arch_skip_instruction(struct sigcontext *context) ...@@ -55,7 +55,7 @@ void arch_skip_instruction(struct sigcontext *context)
vlen = *(char*) context->sc_pc++; vlen = *(char*) context->sc_pc++;
/* Skip lisp error arg data bytes */ /* Skip lisp error arg data bytes */
while(vlen-- > 0) while(vlen-- > 0)
(char*) context->sc_pc++; ((char*) context->sc_pc)++;
break; break;
case trap_Breakpoint: case trap_Breakpoint:
...@@ -291,8 +291,6 @@ void sigtrap_handler(HANDLER_ARGS) ...@@ -291,8 +291,6 @@ void sigtrap_handler(HANDLER_ARGS)
#define FIXNUM_VALUE(lispobj) (((int) lispobj) >> 2) #define FIXNUM_VALUE(lispobj) (((int) lispobj) >> 2)
extern void first_handler();
void arch_install_interrupt_handlers() void arch_install_interrupt_handlers()
{ {
interrupt_install_low_level_handler(SIGILL, sigtrap_handler); interrupt_install_low_level_handler(SIGILL, sigtrap_handler);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment