Fixed various GCC compiler warnings for the kernel.
Only main() now gives a warning about the return type (GCC wants an int).
This commit is contained in:
parent
3eeff022fb
commit
355a10864b
|
@ -150,10 +150,6 @@ message *m_ptr; /* pointer to request message */
|
|||
/* Despite its name, this routine is not called on every clock tick. It
|
||||
* is called on those clock ticks when a lot of work needs to be done.
|
||||
*/
|
||||
register struct proc *rp;
|
||||
register int proc_nr;
|
||||
timer_t *tp;
|
||||
struct proc *p;
|
||||
|
||||
/* Check if a clock timer expired and run its watchdog function. */
|
||||
if (next_timeout <= realtime) {
|
||||
|
@ -226,7 +222,6 @@ irq_hook_t *hook;
|
|||
* faster on a 5MHz 8088, and make task debugging much easier since there are
|
||||
* no task switches on an inactive system.
|
||||
*/
|
||||
register struct proc *rp;
|
||||
register unsigned ticks;
|
||||
message m;
|
||||
#if ! NEW_TIME_COUNT
|
||||
|
|
|
@ -22,23 +22,23 @@ unsigned vec_nr;
|
|||
int minprocessor;
|
||||
};
|
||||
static struct ex_s ex_data[] = {
|
||||
"Divide error", SIGFPE, 86,
|
||||
"Debug exception", SIGTRAP, 86,
|
||||
"Nonmaskable interrupt", SIGBUS, 86,
|
||||
"Breakpoint", SIGEMT, 86,
|
||||
"Overflow", SIGFPE, 86,
|
||||
"Bounds check", SIGFPE, 186,
|
||||
"Invalid opcode", SIGILL, 186,
|
||||
"Coprocessor not available", SIGFPE, 186,
|
||||
"Double fault", SIGBUS, 286,
|
||||
"Copressor segment overrun", SIGSEGV, 286,
|
||||
"Invalid TSS", SIGSEGV, 286,
|
||||
"Segment not present", SIGSEGV, 286,
|
||||
"Stack exception", SIGSEGV, 286, /* STACK_FAULT already used */
|
||||
"General protection", SIGSEGV, 286,
|
||||
"Page fault", SIGSEGV, 386, /* not close */
|
||||
NIL_PTR, SIGILL, 0, /* probably software trap */
|
||||
"Coprocessor error", SIGFPE, 386,
|
||||
{ "Divide error", SIGFPE, 86 },
|
||||
{ "Debug exception", SIGTRAP, 86 },
|
||||
{ "Nonmaskable interrupt", SIGBUS, 86 },
|
||||
{ "Breakpoint", SIGEMT, 86 },
|
||||
{ "Overflow", SIGFPE, 86 },
|
||||
{ "Bounds check", SIGFPE, 186 },
|
||||
{ "Invalid opcode", SIGILL, 186 },
|
||||
{ "Coprocessor not available", SIGFPE, 186 },
|
||||
{ "Double fault", SIGBUS, 286 },
|
||||
{ "Copressor segment overrun", SIGSEGV, 286 },
|
||||
{ "Invalid TSS", SIGSEGV, 286 },
|
||||
{ "Segment not present", SIGSEGV, 286 },
|
||||
{ "Stack exception", SIGSEGV, 286 }, /* STACK_FAULT already used */
|
||||
{ "General protection", SIGSEGV, 286 },
|
||||
{ "Page fault", SIGSEGV, 386 }, /* not close */
|
||||
{ NIL_PTR, SIGILL, 0 }, /* probably software trap */
|
||||
{ "Coprocessor error", SIGFPE, 386 },
|
||||
};
|
||||
register struct ex_s *ep;
|
||||
struct proc *saved_proc;
|
||||
|
|
|
@ -436,7 +436,6 @@ register struct proc *rp; /* this process is now runnable */
|
|||
{
|
||||
/* Add 'rp' to one of the queues of runnable processes. */
|
||||
register int q = rp->p_priority; /* scheduling queue to use */
|
||||
register struct proc **xpp; /* iterate over queue */
|
||||
|
||||
#if ENABLE_K_DEBUGGING
|
||||
if(rp->p_ready) {
|
||||
|
|
|
@ -93,23 +93,23 @@ PUBLIC void prot_init()
|
|||
unsigned char privilege;
|
||||
}
|
||||
gate_table[] = {
|
||||
divide_error, DIVIDE_VECTOR, INTR_PRIVILEGE,
|
||||
single_step_exception, DEBUG_VECTOR, INTR_PRIVILEGE,
|
||||
nmi, NMI_VECTOR, INTR_PRIVILEGE,
|
||||
breakpoint_exception, BREAKPOINT_VECTOR, USER_PRIVILEGE,
|
||||
overflow, OVERFLOW_VECTOR, USER_PRIVILEGE,
|
||||
bounds_check, BOUNDS_VECTOR, INTR_PRIVILEGE,
|
||||
inval_opcode, INVAL_OP_VECTOR, INTR_PRIVILEGE,
|
||||
copr_not_available, COPROC_NOT_VECTOR, INTR_PRIVILEGE,
|
||||
double_fault, DOUBLE_FAULT_VECTOR, INTR_PRIVILEGE,
|
||||
copr_seg_overrun, COPROC_SEG_VECTOR, INTR_PRIVILEGE,
|
||||
inval_tss, INVAL_TSS_VECTOR, INTR_PRIVILEGE,
|
||||
segment_not_present, SEG_NOT_VECTOR, INTR_PRIVILEGE,
|
||||
stack_exception, STACK_FAULT_VECTOR, INTR_PRIVILEGE,
|
||||
general_protection, PROTECTION_VECTOR, INTR_PRIVILEGE,
|
||||
{ divide_error, DIVIDE_VECTOR, INTR_PRIVILEGE },
|
||||
{ single_step_exception, DEBUG_VECTOR, INTR_PRIVILEGE },
|
||||
{ nmi, NMI_VECTOR, INTR_PRIVILEGE },
|
||||
{ breakpoint_exception, BREAKPOINT_VECTOR, USER_PRIVILEGE },
|
||||
{ overflow, OVERFLOW_VECTOR, USER_PRIVILEGE },
|
||||
{ bounds_check, BOUNDS_VECTOR, INTR_PRIVILEGE },
|
||||
{ inval_opcode, INVAL_OP_VECTOR, INTR_PRIVILEGE },
|
||||
{ copr_not_available, COPROC_NOT_VECTOR, INTR_PRIVILEGE },
|
||||
{ double_fault, DOUBLE_FAULT_VECTOR, INTR_PRIVILEGE },
|
||||
{ copr_seg_overrun, COPROC_SEG_VECTOR, INTR_PRIVILEGE },
|
||||
{ inval_tss, INVAL_TSS_VECTOR, INTR_PRIVILEGE },
|
||||
{ segment_not_present, SEG_NOT_VECTOR, INTR_PRIVILEGE },
|
||||
{ stack_exception, STACK_FAULT_VECTOR, INTR_PRIVILEGE },
|
||||
{ general_protection, PROTECTION_VECTOR, INTR_PRIVILEGE },
|
||||
#if _WORD_SIZE == 4
|
||||
page_fault, PAGE_FAULT_VECTOR, INTR_PRIVILEGE,
|
||||
copr_error, COPROC_ERR_VECTOR, INTR_PRIVILEGE,
|
||||
{ page_fault, PAGE_FAULT_VECTOR, INTR_PRIVILEGE },
|
||||
{ copr_error, COPROC_ERR_VECTOR, INTR_PRIVILEGE },
|
||||
#endif
|
||||
{ hwint00, VECTOR( 0), INTR_PRIVILEGE },
|
||||
{ hwint01, VECTOR( 1), INTR_PRIVILEGE },
|
||||
|
|
|
@ -27,7 +27,6 @@ U16_t parmoff, parmsize; /* boot parameters offset and length */
|
|||
*/
|
||||
char params[128*sizeof(char *)]; /* boot monitor parameters */
|
||||
register char *value; /* value in key=value pair */
|
||||
unsigned mon_start;
|
||||
extern int etext, end;
|
||||
|
||||
/* Decide if mode is protected; 386 or higher implies protected mode.
|
||||
|
|
|
@ -320,7 +320,7 @@ int sig_nr; /* signal to be sent, 1 to _NSIG */
|
|||
* the process when PM is informed, because PM can block waiting for FS to
|
||||
* do a core dump.
|
||||
*/
|
||||
register struct proc *rp, *mmp;
|
||||
register struct proc *rp;
|
||||
message m;
|
||||
|
||||
rp = proc_addr(proc_nr);
|
||||
|
@ -353,10 +353,9 @@ vir_bytes bytes; /* # of bytes to be copied */
|
|||
* calling function will think an error occurred. This is not a problem,
|
||||
* since no one uses the first BIOS interrupt vector.
|
||||
*/
|
||||
phys_bytes phys_addr;
|
||||
|
||||
/* Check all acceptable ranges. */
|
||||
#if 0
|
||||
#if DEAD_CODE
|
||||
if (vir_addr >= BIOS_MEM_BEGIN && vir_addr + bytes <= BIOS_MEM_END)
|
||||
return (phys_bytes) vir_addr;
|
||||
else if (vir_addr >= UPPER_MEM_BEGIN && vir_addr + bytes <= UPPER_MEM_END)
|
||||
|
|
|
@ -23,7 +23,6 @@ register message *m_ptr; /* pointer to request message */
|
|||
/* Dismember the request message. */
|
||||
int irq_vec;
|
||||
int irq_hook_id;
|
||||
int proc_nr;
|
||||
int r = OK;
|
||||
irq_hook_t *hook_ptr;
|
||||
|
||||
|
|
|
@ -188,8 +188,7 @@ message *m_ptr; /* pointer to request message */
|
|||
{
|
||||
/* Handle sys_exit. A user process has exited (the PM sent the request).
|
||||
*/
|
||||
register struct proc *rp, *rc;
|
||||
struct proc *np, *xp;
|
||||
register struct proc *rc;
|
||||
int exit_proc_nr;
|
||||
|
||||
/* Get a pointer to the process that exited. */
|
||||
|
|
|
@ -25,7 +25,6 @@ message *m_ptr; /* pointer to request message */
|
|||
/* Handle sys_exit. A server or driver wants to exit. This may happen
|
||||
* on a panic, but also is done when MINIX is shutdown.
|
||||
*/
|
||||
register struct proc *rp;
|
||||
int proc_nr = m_ptr->m_source; /* can only exit own process */
|
||||
|
||||
if (m_ptr->EXIT_STATUS != 0) {
|
||||
|
|
Loading…
Reference in a new issue