diff options
-rw-r--r-- | ChangeLog | 31 | ||||
-rw-r--r-- | device/ds_routines.c | 1 | ||||
-rw-r--r-- | device/kmsg.c | 1 | ||||
-rw-r--r-- | device/net_io.c | 1 | ||||
-rw-r--r-- | i386/i386/pcb.c | 4 | ||||
-rw-r--r-- | i386/i386/pic.c | 2 | ||||
-rw-r--r-- | i386/i386/pit.c | 1 | ||||
-rw-r--r-- | i386/i386/trap.c | 4 | ||||
-rw-r--r-- | i386/i386at/i386at_ds_routines.c | 1 | ||||
-rw-r--r-- | i386/i386at/kd.c | 3 | ||||
-rw-r--r-- | i386/i386at/kd_event.c | 4 | ||||
-rw-r--r-- | i386/i386at/kd_mouse.c | 2 | ||||
-rw-r--r-- | i386/i386at/lpr.c | 3 | ||||
-rw-r--r-- | i386/intel/pmap.c | 1 | ||||
-rw-r--r-- | ipc/ipc_kmsg.c | 1 | ||||
-rw-r--r-- | kern/bootstrap.c | 2 | ||||
-rw-r--r-- | vm/vm_kern.c | 1 |
17 files changed, 33 insertions, 30 deletions
@@ -1,3 +1,34 @@ +2006-11-11 Samuel Thibault <samuel.thibault@ens-lyon.org> + + Fix a bunch of "unused variable" warnings. + + * device/ds_routines.c (ds_device_open): Remove unused `namebuf' + variable. + * device/kmsg.c (kmsgread): Remove unused `err' variable. + * device/net_io.c (net_set_filter): Remove unused `j' variable. + * i386/i386/pcb.c (curr_gdt, curr_ktss): Artificially use parameter of + macro. + * i386/i386/pic.c (picinit): Remove unused `i' variable. + * i386/i386/pit.c (clkstart): Remove unused `flags' variable. + * i386/i386/trap.c (kernel_trap): Remove unused `exc' variable. + (user_trap): Remove unused `map' and `result' variables. + (v86_assist): Remove unused `size' variable. + * i386/i386at/i386at_ds_routines.c (ds_device_open): Remove unused + `dev' variable. + * i386/i386at/kd.c (kdintr): Remove unused `o_pri' variable. + (kdcngetc): Remove unused `i' variable. + * i386/i386at/kd_event.c (kbdgetstat, kbdsetstat): Remove unused + `result' variable. + * i386/i386at/kd_mouse.c (mousegetstat): Likewise. + * i386/i386at/lpr.c (lprattach): Remove unused `tp' variable. + (lprsetstat): Remove unused `dev_addr' and `s' variables. + * i386/intel/pmap.c (pmap_bootstrap): Remove unused `pteva' variable. + * ipc/ipc_kmsg.c (ipc_kmsg_copyin_body): Remove unused `mr' variable. + * kern/bootstrap.c (boot_script_exec_cmd): Remove unused + `boot_exec_info' and `user_map' variables. + * vm/vm_kern.c (projected_buffer_map): Remove unused `object' + variable. + 2006-11-10 Samuel Thibault <samuel.thibault@ens-lyon.org> * kern/sched_prim.h (thread_syscall_return): Replace old `volatile' diff --git a/device/ds_routines.c b/device/ds_routines.c index 371bbb8..303d6f7 100644 --- a/device/ds_routines.c +++ b/device/ds_routines.c @@ -109,7 +109,6 @@ ds_device_open(open_port, reply_port, reply_port_type, register mach_device_t device; register kern_return_t result; register io_req_t ior; - char namebuf[64]; ipc_port_t notify; #ifndef i386 diff --git a/device/kmsg.c b/device/kmsg.c index d1612ad..384f89a 100644 --- a/device/kmsg.c +++ b/device/kmsg.c @@ -147,7 +147,6 @@ kmsgread (dev_t dev, io_req_t ior) static boolean_t kmsg_read_done (io_req_t ior) { - int err; int amt, len; simple_lock (&kmsg_lock); diff --git a/device/net_io.c b/device/net_io.c index 798ac7c..e0eb334 100644 --- a/device/net_io.c +++ b/device/net_io.c @@ -1332,7 +1332,6 @@ net_set_filter(ifp, rcv_port, priority, filter, filter_count) if (match != 0) { /* Insert to hash list */ net_hash_entry_t *p; - int j; hash_entp->rcv_port = rcv_port; for (i = 0; i < match->jt; i++) /* match->jt is n_keys */ diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c index fb39cfb..1ff80f2 100644 --- a/i386/i386/pcb.c +++ b/i386/i386/pcb.c @@ -124,8 +124,8 @@ vm_offset_t stack_detach(thread) #define curr_gdt(mycpu) (mp_gdt[mycpu]) #define curr_ktss(mycpu) (mp_ktss[mycpu]) #else -#define curr_gdt(mycpu) (gdt) -#define curr_ktss(mycpu) (&ktss) +#define curr_gdt(mycpu) ((mycpu), gdt) +#define curr_ktss(mycpu) ((mycpu), &ktss) #endif #define gdt_desc_p(mycpu,sel) \ diff --git a/i386/i386/pic.c b/i386/i386/pic.c index f73745c..ee07b65 100644 --- a/i386/i386/pic.c +++ b/i386/i386/pic.c @@ -107,8 +107,6 @@ u_short PICM_ICW4, PICS_ICW4 ; picinit() { - u_short i; - asm("cli"); /* diff --git a/i386/i386/pit.c b/i386/i386/pit.c index 0cb02a4..b9d71db 100644 --- a/i386/i386/pit.c +++ b/i386/i386/pit.c @@ -67,7 +67,6 @@ unsigned int clknumb = CLKNUM; /* interrupt interval for timer 0 */ clkstart() { - unsigned int flags; unsigned char byte; int s; diff --git a/i386/i386/trap.c b/i386/i386/trap.c index c52f004..068a0b3 100644 --- a/i386/i386/trap.c +++ b/i386/i386/trap.c @@ -172,7 +172,6 @@ boolean_t brb = TRUE; void kernel_trap(regs) register struct i386_saved_state *regs; { - int exc; int code; int subcode; register int type; @@ -368,8 +367,6 @@ int user_trap(regs) int code; int subcode; register int type; - vm_map_t map; - kern_return_t result; register thread_t thread = current_thread(); extern vm_offset_t phys_last_addr; @@ -840,7 +837,6 @@ v86_assist(thread, regs) { vm_offset_t sp; int nflags; - int size; union iret_struct iret_struct; v86->flags &= ~V86_IRET_PENDING; diff --git a/i386/i386at/i386at_ds_routines.c b/i386/i386at/i386at_ds_routines.c index 0cd8b54..53a3773 100644 --- a/i386/i386at/i386at_ds_routines.c +++ b/i386/i386at/i386at_ds_routines.c @@ -72,7 +72,6 @@ ds_device_open (ipc_port_t open_port, ipc_port_t reply_port, char *name, device_t *devp) { int i; - device_t dev; io_return_t err; /* Open must be called on the master device port. */ diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c index e982b12..b8249c2 100644 --- a/i386/i386at/kd.c +++ b/i386/i386at/kd.c @@ -763,7 +763,6 @@ int regs; struct tty *tp; unsigned char c; unsigned char scancode; - int o_pri; int char_idx; boolean_t up = FALSE; /* key-up event */ extern int mouse_in_use; @@ -2973,8 +2972,6 @@ kdcngetc(dev_t dev, int wait) int kdcnputc(dev_t dev, int c) { - int i; - if (!kd_initialized) return; diff --git a/i386/i386at/kd_event.c b/i386/i386at/kd_event.c index c421820..ff70ce0 100644 --- a/i386/i386at/kd_event.c +++ b/i386/i386at/kd_event.c @@ -182,8 +182,6 @@ io_return_t kbdgetstat(dev, flavor, data, count) int * data; /* pointer to OUT array */ unsigned int *count; /* OUT */ { - io_return_t result; - switch (flavor) { case KDGKBDTYPE: *data = KB_VANILLAKB; @@ -206,8 +204,6 @@ io_return_t kbdsetstat(dev, flavor, data, count) int * data; unsigned int count; { - io_return_t result; - switch (flavor) { case KDSKBDMODE: kb_mode = *data; diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c index 52358f1..679b69e 100644 --- a/i386/i386at/kd_mouse.c +++ b/i386/i386at/kd_mouse.c @@ -321,8 +321,6 @@ io_return_t mousegetstat(dev, flavor, data, count) int * data; /* pointer to OUT array */ unsigned int *count; /* OUT */ { - io_return_t result; - switch (flavor) { case DEV_GET_SIZE: data[DEV_GET_SIZE_DEVICE_SIZE] = 0; diff --git a/i386/i386at/lpr.c b/i386/i386at/lpr.c index 1483687..d68313d 100644 --- a/i386/i386at/lpr.c +++ b/i386/i386at/lpr.c @@ -113,7 +113,6 @@ void lprattach(struct bus_device *dev) { u_char unit = dev->unit; u_short addr = (u_short) dev->address; - struct tty *tp = &lpr_tty[unit]; take_dev_irq(dev); printf(", port = %x, spl = %d, pic = %d.", @@ -228,8 +227,6 @@ unsigned int count; { io_return_t result = D_SUCCESS; int unit = minor(dev); - u_short dev_addr = (u_short) lprinfo[unit]->address; - int s; switch (flavor) { default: diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c index ae352ed..43f952b 100644 --- a/i386/intel/pmap.c +++ b/i386/intel/pmap.c @@ -644,7 +644,6 @@ void pmap_bootstrap() pt_entry_t *pde = kernel_page_dir + lin2pdenum(kvtolin(va)); pt_entry_t *ptable = (pt_entry_t*)pmap_grab_page(); pt_entry_t *pte; - vm_offset_t pteva; /* Initialize the page directory entry. */ *pde = pa_to_pte((vm_offset_t)ptable) diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c index f918bd4..9f207d7 100644 --- a/ipc/ipc_kmsg.c +++ b/ipc/ipc_kmsg.c @@ -1377,7 +1377,6 @@ ipc_kmsg_copyin_body(kmsg, space, map) ipc_object_t dest; vm_offset_t saddr, eaddr; boolean_t complex; - mach_msg_return_t mr; boolean_t use_page_lists, steal_pages; dest = (ipc_object_t) kmsg->ikm_header.msgh_remote_port; diff --git a/kern/bootstrap.c b/kern/bootstrap.c index 4d2f1cf..0fa4d2d 100644 --- a/kern/bootstrap.c +++ b/kern/bootstrap.c @@ -690,9 +690,7 @@ boot_script_exec_cmd (void *hook, task_t task, char *path, int argc, char **argv, char *strings, int stringlen) { struct multiboot_module *mod = hook; - exec_info_t boot_exec_info; - register vm_map_t user_map = current_task()->map; int err; if (task != MACH_PORT_NULL) diff --git a/vm/vm_kern.c b/vm/vm_kern.c index 33f47c7..2864fa1 100644 --- a/vm/vm_kern.c +++ b/vm/vm_kern.c @@ -184,7 +184,6 @@ projected_buffer_map(map, kernel_addr, size, user_p, protection, inheritance) vm_prot_t protection; vm_inherit_t inheritance; /*Currently only VM_INHERIT_NONE supported*/ { - vm_object_t object; vm_map_entry_t u_entry, k_entry; vm_offset_t physical_addr, user_addr; vm_size_t r_size; |