From: Kees van Reeuwijk Date: Fri, 22 Jan 2010 22:01:08 +0000 (+0000) Subject: Removed unused symbols. X-Git-Tag: v3.1.6~45 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.named.html?a=commitdiff_plain;h=a7cee5bec41f06f0d982811bd9ce187b016a0bdd;p=minix.git Removed unused symbols. Minor cleanups. --- diff --git a/drivers/amddev/amddev.c b/drivers/amddev/amddev.c index 3653e2243..d4ce79b33 100644 --- a/drivers/amddev/amddev.c +++ b/drivers/amddev/amddev.c @@ -243,7 +243,7 @@ static void write_reg(int function, int index, u32_t value) static void init_domain(int index) { - size_t o, size, memsize; + size_t size, memsize; phys_bytes busaddr; size= 0x100000 / 8; @@ -332,7 +332,7 @@ static int do_add(message *m) static int do_add_phys(message *m) { - int i, r; + int i; phys_bytes start; size_t size; @@ -368,7 +368,6 @@ static int do_add_phys(message *m) static int do_del_phys(message *m) { - int r; phys_bytes start; size_t size; diff --git a/drivers/at_wini/at_wini.c b/drivers/at_wini/at_wini.c index 00fec44ae..bdb03e8f5 100644 --- a/drivers/at_wini/at_wini.c +++ b/drivers/at_wini/at_wini.c @@ -792,7 +792,7 @@ PRIVATE int w_identify() struct wini *wn = w_wn; struct command cmd; - int i, s; + int s; u16_t w; unsigned long size; int prev_wakeup; @@ -1191,9 +1191,9 @@ unsigned nr_req; /* length of request vector */ struct wini *wn = w_wn; iovec_t *iop, *iov_end = iov + nr_req; int n, r, s, errors, do_dma, do_write, do_copyout; - unsigned long v, block, w_status; + unsigned long block, w_status; u64_t dv_size = w_dv->dv_size; - unsigned cylinder, head, sector, nbytes; + unsigned nbytes; unsigned dma_buf_offset; size_t addr_offset = 0; @@ -1475,7 +1475,6 @@ struct command *cmd; /* Command block */ unsigned base_ctl = wn->base_ctl; pvb_pair_t outbyte[11]; /* vector for sys_voutb() */ int s; /* status for sys_(v)outb() */ - unsigned long w_status; if (w_wn->state & IGNORING) return ERR; diff --git a/drivers/audio/es1370/es1370.c b/drivers/audio/es1370/es1370.c index 7f4679acd..a463fe335 100644 --- a/drivers/audio/es1370/es1370.c +++ b/drivers/audio/es1370/es1370.c @@ -227,7 +227,6 @@ int drv_reset() { int drv_start(int sub_dev, int DmaMode) { u32_t enable_bit, result = 0; - u32_t debug; /* Write default values to device in case user failed to configure. If user did configure properly, everything is written twice. @@ -386,7 +385,6 @@ int drv_int_sum(void) { int drv_int(int sub_dev) { u32_t int_status; u32_t bit; - u32_t debug; /* return status of interrupt bit of specified channel*/ switch (sub_dev) { diff --git a/drivers/audio/es1371/es1371.c b/drivers/audio/es1371/es1371.c index e91a09a8c..5e7afc440 100644 --- a/drivers/audio/es1371/es1371.c +++ b/drivers/audio/es1371/es1371.c @@ -116,7 +116,6 @@ PUBLIC int drv_init(void) { PUBLIC int drv_init_hw (void) { u16_t i, j; - u16_t chip_sel_ctrl_reg; /* First, detect the hardware */ if (detect_hw() != OK) { @@ -230,7 +229,6 @@ int drv_reset() { int drv_start(int sub_dev, int DmaMode) { u32_t enable_bit, result = 0; - u32_t debug; /* Write default values to device in case user failed to configure. If user did configure properly, everything is written twice. @@ -388,7 +386,6 @@ int drv_int_sum(void) { int drv_int(int sub_dev) { u32_t int_status; u32_t bit; - u32_t debug; /* return status of interrupt bit of specified channel*/ switch (sub_dev) { diff --git a/drivers/audio/framework/audio_fw.c b/drivers/audio/framework/audio_fw.c index 8434c5316..818383ab3 100644 --- a/drivers/audio/framework/audio_fw.c +++ b/drivers/audio/framework/audio_fw.c @@ -87,7 +87,7 @@ PUBLIC int is_status_msg_expected = FALSE; PUBLIC void main(void) { - int r, caller, proc_nr, chan; + int r, caller, proc_nr; message mess, repl_mess; /* SEF local startup. */ @@ -311,7 +311,7 @@ PRIVATE int msg_open (int minor_dev_nr) { PRIVATE int open_sub_dev(int sub_dev_nr, int dma_mode) { - sub_dev_t* sub_dev_ptr; int i; + sub_dev_t* sub_dev_ptr; sub_dev_ptr = &sub_dev[sub_dev_nr]; /* Only one open at a time per sub device */ @@ -410,7 +410,6 @@ PRIVATE int close_sub_dev(int sub_dev_nr) { PRIVATE int msg_ioctl(message *m_ptr) { int status, len, chan; - phys_bytes user_phys; sub_dev_t *sub_dev_ptr; special_file_t* special_file_ptr; @@ -473,7 +472,7 @@ PRIVATE int msg_ioctl(message *m_ptr) PRIVATE void msg_write(message *m_ptr) { - int s, chan; sub_dev_t *sub_dev_ptr; + int chan; sub_dev_t *sub_dev_ptr; special_file_t* special_file_ptr; dprint("%s: msg_write() device %d\n", drv.DriverName, m_ptr->DEVICE); @@ -524,7 +523,7 @@ PRIVATE void msg_write(message *m_ptr) PRIVATE void msg_read(message *m_ptr) { - int s, chan; sub_dev_t *sub_dev_ptr; + int chan; sub_dev_t *sub_dev_ptr; special_file_t* special_file_ptr; dprint("%s: msg_read() device %d\n", drv.DriverName, m_ptr->DEVICE); diff --git a/drivers/dpeth/3c509.c b/drivers/dpeth/3c509.c index ffa89ff08..c170403ea 100644 --- a/drivers/dpeth/3c509.c +++ b/drivers/dpeth/3c509.c @@ -120,7 +120,6 @@ static void el3_reset(dpeth_t * dep) */ static void el3_write_fifo(dpeth_t * dep, int pktsize) { - phys_bytes phys_user; int bytes, ix = 0; iovec_dat_s_t *iovp = &dep->de_write_iovec; int r, padding = pktsize; diff --git a/drivers/dpeth/8390.c b/drivers/dpeth/8390.c index 9116d2fea..8f6ecb5e7 100644 --- a/drivers/dpeth/8390.c +++ b/drivers/dpeth/8390.c @@ -90,7 +90,7 @@ static void mem_getblock(dpeth_t *dep, u16_t offset, int size, void *dst) */ static void mem_nic2user(dpeth_t * dep, int pageno, int pktsize) { - phys_bytes offset, phys_user; + phys_bytes offset; iovec_dat_s_t *iovp = &dep->de_read_iovec; int bytes, ix = 0; @@ -197,7 +197,6 @@ static void pio_getblock(dpeth_t *dep, u16_t offset, int size, void *dst) */ static void pio_nic2user(dpeth_t *dep, int pageno, int pktsize) { - phys_bytes phys_user; iovec_dat_s_t *iovp = &dep->de_read_iovec; unsigned offset, iov_offset; int r, bytes, ix = 0; @@ -253,7 +252,6 @@ static void pio_nic2user(dpeth_t *dep, int pageno, int pktsize) */ static void pio_user2nic(dpeth_t *dep, int pageno, int pktsize) { - phys_bytes phys_user; iovec_dat_s_t *iovp = &dep->de_write_iovec; int r, bytes, ix = 0; @@ -478,7 +476,7 @@ static void ns_recv(dpeth_t *dep, int fromint, int size) static void ns_interrupt(dpeth_t * dep) { int isr, tsr; - int size, queue; + int queue; while ((isr = inb_reg0(dep, DP_ISR)) != 0) { diff --git a/drivers/e1000/e1000.c b/drivers/e1000/e1000.c index c85882cb4..26901bae0 100644 --- a/drivers/e1000/e1000.c +++ b/drivers/e1000/e1000.c @@ -360,7 +360,6 @@ PRIVATE int e1000_init_hw(e) e1000_t *e; { int r, i; - u16_t word; e->status |= E1000_ENABLED; e->irq_hook = e->irq; diff --git a/drivers/floppy/floppy.c b/drivers/floppy/floppy.c index 00700d310..263e19754 100644 --- a/drivers/floppy/floppy.c +++ b/drivers/floppy/floppy.c @@ -381,7 +381,6 @@ PRIVATE void f_expire_tmrs(struct driver *dp, message *m_ptr) * timers. Possibly reschedule the next alarm. */ clock_t now; /* current time */ - timer_t *tp; int s; /* Get the current time to compare the timers against. */ diff --git a/drivers/fxp/fxp.c b/drivers/fxp/fxp.c index 79bb5c614..0026f4711 100644 --- a/drivers/fxp/fxp.c +++ b/drivers/fxp/fxp.c @@ -2938,7 +2938,6 @@ PRIVATE void fxp_expire_timers() * timers. Possibly reschedule the next alarm. */ clock_t now; /* current time */ - timer_t *tp; int r; /* Get the current time to compare the timers against. */ diff --git a/drivers/lance/lance.c b/drivers/lance/lance.c index c6a49e19c..df8abcc5c 100644 --- a/drivers/lance/lance.c +++ b/drivers/lance/lance.c @@ -1486,14 +1486,12 @@ ether_card_t *ec; static int lance_probe(ec) ether_card_t *ec; { - unsigned short pci_cmd, attached = 0; + unsigned short pci_cmd; unsigned short ioaddr; int lance_version, chip_version; int devind, just_one, i, r; u16_t vid, did; - u32_t bar; - u8_t ilr; char *dname; if ((ec->ec_pcibus | ec->ec_pcidev | ec->ec_pcifunc) != 0) diff --git a/drivers/libdriver/driver.c b/drivers/libdriver/driver.c index 770e6f6d3..5b3c630bd 100644 --- a/drivers/libdriver/driver.c +++ b/drivers/libdriver/driver.c @@ -255,8 +255,6 @@ PUBLIC void init_buffer(void) * 'tmp_phys', the normal address is 'tmp_buf'. */ - unsigned left; - if(!(tmp_buf = alloc_contig(2*DMA_BUF_SIZE, AC_ALIGN4K, &tmp_phys))) panic(__FILE__, "can't allocate tmp_buf", DMA_BUF_SIZE); } @@ -271,7 +269,6 @@ message *mp; /* pointer to read or write message */ /* Carry out a single read or write request. */ iovec_t iovec1; int r, opcode; - phys_bytes phys_addr; u64_t position; /* Disk address? Address and length of the user buffer? */ @@ -309,7 +306,7 @@ message *mp; /* pointer to read or write message */ static iovec_t iovec[NR_IOREQS]; phys_bytes iovec_size; unsigned nr_req; - int r, j, opcode; + int r, opcode; u64_t position; nr_req = mp->COUNT; /* Length of I/O vector */ diff --git a/drivers/log/log.c b/drivers/log/log.c index e662f9aa2..7de4fdf32 100644 --- a/drivers/log/log.c +++ b/drivers/log/log.c @@ -290,7 +290,6 @@ unsigned nr_req; /* length of request vector */ unsigned long dv_size; int accumulated_read = 0; struct logdevice *log; - static int f; size_t vir_offset = 0; if(log_device < 0 || log_device >= NR_DEVS) diff --git a/kernel/arch/i386/apic.c b/kernel/arch/i386/apic.c index 453caac34..a47321312 100644 --- a/kernel/arch/i386/apic.c +++ b/kernel/arch/i386/apic.c @@ -308,9 +308,6 @@ PRIVATE int lapic_enable_in_msr(void) PUBLIC int lapic_enable(void) { u32_t val, nlvt; - u32_t timeout = 0xFFFF; - u32_t errstatus = 0; - int i; unsigned cpu = cpuid; if (!lapic_addr) diff --git a/kernel/arch/i386/arch_do_vmctl.c b/kernel/arch/i386/arch_do_vmctl.c index 18dc42624..56b081b14 100644 --- a/kernel/arch/i386/arch_do_vmctl.c +++ b/kernel/arch/i386/arch_do_vmctl.c @@ -64,7 +64,6 @@ struct proc *p; } case VMCTL_I386_PAGEDIRS: { - int pde; vm_pagedirs = (u32_t *) m_ptr->SVMCTL_VALUE; return OK; } diff --git a/kernel/arch/i386/do_sdevio.c b/kernel/arch/i386/do_sdevio.c index 338899af7..0e7641e90 100644 --- a/kernel/arch/i386/do_sdevio.c +++ b/kernel/arch/i386/do_sdevio.c @@ -35,8 +35,6 @@ PUBLIC int do_sdevio( struct proc *rp; struct priv *privp; struct io_range *iorp; - int rem; - vir_bytes addr; struct proc *destproc; /* Allow safe copies and accesses to SELF */ diff --git a/kernel/arch/i386/exception.c b/kernel/arch/i386/exception.c index 7cc234334..ba17b6eb4 100644 --- a/kernel/arch/i386/exception.c +++ b/kernel/arch/i386/exception.c @@ -19,10 +19,6 @@ void pagefault( struct proc *pr, struct exception_frame * frame, int is_nested) { - int s; - vir_bytes ph; - u32_t pte; - int procok = 0, pcok = 0, rangeok = 0; int in_physcopy = 0; reg_t pagefaultcr2; @@ -108,8 +104,6 @@ PUBLIC void exception_handler(int is_nested, struct exception_frame * frame) { /* An exception or unexpected interrupt has occurred. */ -struct proc *t; - struct ex_s { char *msg; int signum; @@ -210,7 +204,7 @@ struct proc *t; *===========================================================================*/ PUBLIC void proc_stacktrace(struct proc *whichproc) { - reg_t bp, v_bp, v_pc, v_hbp; + reg_t v_bp, v_pc, v_hbp; int iskernel; v_bp = whichproc->p_reg.fp; diff --git a/kernel/arch/i386/i8259.c b/kernel/arch/i386/i8259.c index 9f63b04bc..8508b359b 100644 --- a/kernel/arch/i386/i8259.c +++ b/kernel/arch/i386/i8259.c @@ -36,8 +36,6 @@ PUBLIC int intr_init(int mine, int auto_eoi) * use the BIOS locations instead. The flag "mine" is set if the 8259s are * to be programmed for MINIX, or to be reset to what the BIOS expects. */ - int i; - if (!intr_disabled()) intr_disable(); diff --git a/kernel/arch/i386/memory.c b/kernel/arch/i386/memory.c index a10c1e38d..5af134944 100644 --- a/kernel/arch/i386/memory.c +++ b/kernel/arch/i386/memory.c @@ -50,7 +50,6 @@ FORWARD _PROTOTYPE( void set_cr3, (void) ); PUBLIC void vm_init(struct proc *newptproc) { - int i; if(vm_running) minix_panic("vm_init: vm_running", NO_NUM); vm_set_cr3(newptproc); @@ -156,9 +155,7 @@ int lin_lin_copy(struct proc *srcproc, vir_bytes srclinaddr, struct proc *dstproc, vir_bytes dstlinaddr, vir_bytes bytes) { u32_t addr; - int o1, o2; int procslot; - int firstloop = 1; NOREC_ENTER(linlincopy); @@ -217,8 +214,6 @@ int lin_lin_copy(struct proc *srcproc, vir_bytes srclinaddr, bytes -= chunk; srclinaddr += chunk; dstlinaddr += chunk; - - firstloop = 0; } NOREC_RETURN(linlincopy, OK); @@ -692,7 +687,7 @@ char *flagstr(u32_t e, int dir) void vm_pt_print(u32_t *pagetable, u32_t v) { - int pte, l = 0; + int pte; int col = 0; vmassert(!((u32_t) pagetable % I386_PAGE_SIZE)); @@ -758,7 +753,6 @@ u32_t read_cr3(void) *===========================================================================*/ int vm_phys_memset(phys_bytes ph, u8_t c, phys_bytes bytes) { - char *v; u32_t p; NOREC_ENTER(physmemset); @@ -808,7 +802,7 @@ int vmcheck; /* if nonzero, can return VMSUSPEND */ struct vir_addr *vir_addr[2]; /* virtual source and destination address */ phys_bytes phys_addr[2]; /* absolute source and destination */ int seg_index; - int i, r; + int i; struct proc *procs[2]; NOREC_ENTER(virtualcopy); @@ -887,8 +881,6 @@ int vmcheck; /* if nonzero, can return VMSUSPEND */ caller = proc_addr(who_p); if(RTS_ISSET(caller, RTS_VMREQUEST)) { - struct proc *target; - int pn; vmassert(caller->p_vmrequest.vmresult != VMSUSPEND); RTS_LOCK_UNSET(caller, RTS_VMREQUEST); if(caller->p_vmrequest.vmresult != OK) { diff --git a/kernel/arch/i386/protect.c b/kernel/arch/i386/protect.c index 306e5e11b..7e079116a 100644 --- a/kernel/arch/i386/protect.c +++ b/kernel/arch/i386/protect.c @@ -129,7 +129,6 @@ PUBLIC void prot_init(void) /* Set up tables for protected mode. * All GDT slots are allocated at compile time. */ - struct gate_table_s *gtp; struct desctableptr_s *dtp; unsigned ldt_index; register struct proc *rp; @@ -439,7 +438,6 @@ PUBLIC void printseg(char *banner, int iscs, struct proc *pr, u32_t selector) PUBLIC int prot_set_kern_seg_limit(vir_bytes limit) { struct proc *rp; - vir_bytes prev; int orig_click; int incr_clicks; diff --git a/kernel/main.c b/kernel/main.c index 589645578..4a0b9aaef 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -33,7 +33,7 @@ PUBLIC void main() struct boot_image *ip; /* boot image pointer */ register struct proc *rp; /* process pointer */ register struct priv *sp; /* privilege structure pointer */ - register int i, j, s; + register int i, j; int hdrindex; /* index to array of a.out headers */ phys_clicks text_base; vir_clicks text_clicks, data_clicks, st_clicks; @@ -75,7 +75,6 @@ PUBLIC void main() for (i=0; i < NR_BOOT_PROCS; ++i) { int schedulable_proc, proc_nr; int ipc_to_m, kcalls; - bitchunk_t fv; ip = &image[i]; /* process' attributes */ rp = proc_addr(ip->proc_nr); /* get process pointer */ @@ -278,8 +277,6 @@ int how; { /* This function prepares to shutdown MINIX. */ static timer_t shutdown_timer; - register struct proc *rp; - message m; /* Continue after 1 second, to give processes a chance to get scheduled to * do shutdown work. Set a watchog timer to call shutdown(). The timer diff --git a/kernel/profile.c b/kernel/profile.c index c4822cfd2..76f5e30fe 100644 --- a/kernel/profile.c +++ b/kernel/profile.c @@ -38,7 +38,7 @@ PRIVATE irq_hook_t profile_clock_hook; *===========================================================================*/ PUBLIC void init_profile_clock(u32_t freq) { - int r, irq; + int irq; intr_disable(); diff --git a/kernel/system.c b/kernel/system.c index 6a658433c..3d2692479 100644 --- a/kernel/system.c +++ b/kernel/system.c @@ -43,8 +43,6 @@ #include #include #include -#include -#include /* Declaration of the call vector that defines the mapping of system calls * to handler functions. The vector is initialized in sys_init() with map(), @@ -74,7 +72,6 @@ PUBLIC void sys_task() register struct proc *caller_ptr; int s; int call_nr; - int n = 0; /* Initialize the system task. */ initialize(); @@ -462,7 +459,6 @@ register struct proc *rc; /* slot of process to clean up */ { register struct proc *rp; /* iterate over process table */ register struct proc **xpp; /* iterate over caller queue */ - struct proc *np; if(isemptyp(rc)) minix_panic("clear_proc: empty process", rc->p_endpoint); @@ -551,7 +547,7 @@ register struct proc *rc; /* slot of process to clean up */ *===========================================================================*/ PRIVATE struct proc *vmrestart_check(message *m) { - int type, r; + int type; struct proc *restarting; /* Anyone waiting to be vm-restarted? */ diff --git a/kernel/system/do_abort.c b/kernel/system/do_abort.c index 9c219751a..efd7a1b4b 100644 --- a/kernel/system/do_abort.c +++ b/kernel/system/do_abort.c @@ -23,8 +23,6 @@ message *m_ptr; /* pointer to request message */ * in the PM (normal abort or panic) or TTY (after CTRL-ALT-DEL). */ int how = m_ptr->ABRT_HOW; - int length; - phys_bytes src_phys; /* See if the monitor is to run the specified instructions. */ if (how == RBT_MONITOR) { diff --git a/kernel/system/do_cprofile.c b/kernel/system/do_cprofile.c index e7ad5fda6..f100aa72d 100644 --- a/kernel/system/do_cprofile.c +++ b/kernel/system/do_cprofile.c @@ -22,9 +22,9 @@ PUBLIC int do_cprofile(m_ptr) register message *m_ptr; /* pointer to request message */ { - int proc_nr, i, err = 0, k = 0; + int proc_nr, i; phys_bytes len; - vir_bytes vir_dst, vir_src; + vir_bytes vir_dst; switch (m_ptr->PROF_ACTION) { diff --git a/kernel/system/do_exec.c b/kernel/system/do_exec.c index 4da151ee5..d4fb7c67c 100644 --- a/kernel/system/do_exec.c +++ b/kernel/system/do_exec.c @@ -22,8 +22,6 @@ register message *m_ptr; /* pointer to request message */ { /* Handle sys_exec(). A process has done a successful EXEC. Patch it up. */ register struct proc *rp; - phys_bytes phys_name; - char *np; int proc_nr; if(!isokendpt(m_ptr->PR_ENDPT, &proc_nr)) diff --git a/kernel/system/do_exit.c b/kernel/system/do_exit.c index 394cc0649..20941ac6b 100644 --- a/kernel/system/do_exit.c +++ b/kernel/system/do_exit.c @@ -48,17 +48,13 @@ message *m_ptr; /* pointer to request message */ PRIVATE void clear_proc(rc) register struct proc *rc; /* slot of process to clean up */ { - register struct proc *rp; /* iterate over process table */ - register struct proc **xpp; /* iterate over caller queue */ int i; - int sys_id; /* Don't clear if already cleared. */ if(isemptyp(rc)) return; /* Check the table with IRQ hooks to see if hooks should be released. */ for (i=0; i < NR_IRQ_HOOKS; i++) { - int proc; if (rc->p_endpoint == irq_hooks[i].proc_nr_e) { rm_irq_handler(&irq_hooks[i]); /* remove interrupt handler */ irq_hooks[i].proc_nr_e = NONE; /* mark hook as free */ diff --git a/kernel/system/do_fork.c b/kernel/system/do_fork.c index ef67d6d24..95e0077ef 100644 --- a/kernel/system/do_fork.c +++ b/kernel/system/do_fork.c @@ -31,7 +31,7 @@ register message *m_ptr; /* pointer to request message */ register struct proc *rpc; /* child process pointer */ struct proc *rpp; /* parent process pointer */ struct mem_map *map_ptr; /* virtual address of map inside caller (PM) */ - int i, gen, r; + int gen, r; int p_proc; if(!isokendpt(m_ptr->PR_ENDPT, &p_proc)) diff --git a/kernel/system/do_getinfo.c b/kernel/system/do_getinfo.c index f7568c71e..a33f2105b 100644 --- a/kernel/system/do_getinfo.c +++ b/kernel/system/do_getinfo.c @@ -29,7 +29,7 @@ register message *m_ptr; /* pointer to request message */ */ size_t length; vir_bytes src_vir; - int proc_nr, nr_e, nr, r; + int nr_e, nr, r; struct proc *caller; int wipe_rnd_bin = -1; struct exec e_hdr; @@ -122,7 +122,7 @@ register message *m_ptr; /* pointer to request message */ break; } case GET_RANDOMNESS_BIN: { - int i, bin = m_ptr->I_VAL_LEN2_E; + int bin = m_ptr->I_VAL_LEN2_E; if(bin < 0 || bin >= RANDOM_SOURCES) { kprintf("SYSTEM: GET_RANDOMNESS_BIN: %d out of range\n", bin); diff --git a/kernel/system/do_newmap.c b/kernel/system/do_newmap.c index 580b69469..ca87a528d 100644 --- a/kernel/system/do_newmap.c +++ b/kernel/system/do_newmap.c @@ -19,7 +19,6 @@ message *m_ptr; /* pointer to request message */ /* Handle sys_newmap(). Fetch the memory map. */ register struct proc *rp; /* process whose map is to be loaded */ struct mem_map *map_ptr; /* virtual address of map inside caller */ - phys_bytes src_phys; /* physical address of map at the */ int proc_nr; map_ptr = (struct mem_map *) m_ptr->PR_MEM_PTR; diff --git a/kernel/system/do_profbuf.c b/kernel/system/do_profbuf.c index f3094835a..4ce308f1f 100644 --- a/kernel/system/do_profbuf.c +++ b/kernel/system/do_profbuf.c @@ -24,7 +24,6 @@ register message *m_ptr; /* pointer to request message */ * which is used to enable the kernel to have the tables cleared. */ int proc_nr; - vir_bytes vir_dst; struct proc *rp; /* Store process name, control struct, table locations. */ diff --git a/kernel/system/do_sprofile.c b/kernel/system/do_sprofile.c index 323caa498..a7fbbfbb8 100644 --- a/kernel/system/do_sprofile.c +++ b/kernel/system/do_sprofile.c @@ -26,9 +26,7 @@ PRIVATE vir_bytes sprof_info_addr_vir; PUBLIC int do_sprofile(m_ptr) register message *m_ptr; /* pointer to request message */ { - int proc_nr, i; - vir_bytes vir_dst; - phys_bytes length; + int proc_nr; switch(m_ptr->PROF_ACTION) { diff --git a/kernel/system/do_sysctl.c b/kernel/system/do_sysctl.c index 69dc4f862..24f39738b 100644 --- a/kernel/system/do_sysctl.c +++ b/kernel/system/do_sysctl.c @@ -7,7 +7,6 @@ */ #include "../system.h" -#include "../vm.h" /*===========================================================================* @@ -18,7 +17,7 @@ register message *m_ptr; /* pointer to request message */ { vir_bytes len, buf; static char mybuf[DIAG_BUFSIZE]; - struct proc *caller, *target; + struct proc *caller; int s, i, proc_nr; caller = proc_addr(who_p); diff --git a/kernel/system/do_vmctl.c b/kernel/system/do_vmctl.c index afc2729a8..4b4f8fd1f 100644 --- a/kernel/system/do_vmctl.c +++ b/kernel/system/do_vmctl.c @@ -11,7 +11,6 @@ #include "../vm.h" #include "../debug.h" #include -#include /*===========================================================================* * do_vmctl * @@ -19,7 +18,7 @@ PUBLIC int do_vmctl(m_ptr) register message *m_ptr; /* pointer to request message */ { - int proc_nr, i; + int proc_nr; endpoint_t ep = m_ptr->SVMCTL_WHO; struct proc *p, *rp, *target; int err; diff --git a/servers/ds/store.c b/servers/ds/store.c index 0aa253799..0c478bb5b 100644 --- a/servers/ds/store.c +++ b/servers/ds/store.c @@ -289,7 +289,7 @@ PUBLIC int do_publish(message *m_ptr) char key_name[DS_MAX_KEYLEN]; int flags = m_ptr->DS_FLAGS; size_t length; - int nr, r; + int r; /* MAP should not be overwritten. */ if((flags & DSF_TYPE_MAP) && (flags & DSF_OVERWRITE)) diff --git a/servers/inet/generic/eth.c b/servers/inet/generic/eth.c index b168f0f2b..66dafc2e5 100644 --- a/servers/inet/generic/eth.c +++ b/servers/inet/generic/eth.c @@ -658,7 +658,6 @@ PUBLIC int eth_select(fd, operations) int fd; unsigned operations; { - int i; unsigned resops; eth_fd_t *eth_fd; @@ -1115,8 +1114,7 @@ printf("eth_restart_ioctl: clearing etp_getstat in port %d\n", PRIVATE int eth_sel_read (eth_fd) eth_fd_t *eth_fd; { - acc_t *pack, *tmp_acc, *next_acc; - int result; + acc_t *tmp_acc, *next_acc; if (!(eth_fd->ef_flags & EFF_OPTSET)) return 1; /* Read will not block */ diff --git a/servers/inet/generic/tcp_recv.c b/servers/inet/generic/tcp_recv.c index 1f71dad9a..e4bb3a8a4 100644 --- a/servers/inet/generic/tcp_recv.c +++ b/servers/inet/generic/tcp_recv.c @@ -1447,11 +1447,8 @@ tcp_fd_t *tcp_fd; int *bytesp; { tcp_conn_t *tcp_conn; - size_t data_size, read_size; - acc_t *data; - int fin_recv, urg, push, result; - i32_t old_window, new_window; - u16_t mss; + size_t data_size; + int fin_recv, urg, push; *bytesp= 0; /* The default is that nothing is available */ diff --git a/servers/inet/generic/udp.c b/servers/inet/generic/udp.c index 967998bf5..066422e5a 100644 --- a/servers/inet/generic/udp.c +++ b/servers/inet/generic/udp.c @@ -296,7 +296,6 @@ PRIVATE int udp_select(fd, operations) int fd; unsigned operations; { - int i; unsigned resops; udp_fd_t *udp_fd;