summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2006-11-11 00:54:05 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:26:53 +0200
commit84fa0626bc30ee2d3dee6c7f8629b4994caf2e68 (patch)
treec3d32f3c2a73d77cbd02d2b431e417e66cc13c99 /i386
parent350415bcec5377422a8dd5e5ef4d1429e60851c3 (diff)
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.
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/pcb.c4
-rw-r--r--i386/i386/pic.c2
-rw-r--r--i386/i386/pit.c1
-rw-r--r--i386/i386/trap.c4
-rw-r--r--i386/i386at/i386at_ds_routines.c1
-rw-r--r--i386/i386at/kd.c3
-rw-r--r--i386/i386at/kd_event.c4
-rw-r--r--i386/i386at/kd_mouse.c2
-rw-r--r--i386/i386at/lpr.c3
-rw-r--r--i386/intel/pmap.c1
10 files changed, 2 insertions, 23 deletions
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)