Subject: port-i386/2852: Variables in vm_machdep.c and pcvt_kbd.c may be unused
To: None <gnats-bugs@gnats.netbsd.org>
From: Erik Bertelsen <erik@aarhus1.uni-c.dk>
List: netbsd-bugs
Date: 10/16/1996 10:38:08
>Number:         2852
>Category:       port-i386
>Synopsis:       vm_machdep.c, pcvt_kbd.c: possible unused variables
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 16 01:05:00 1996
>Last-Modified:
>Originator:     Erik Bertelsen
>Organization:
	
>Release:        1.2-current, 15 October 1996
>Environment:
	
System: NetBSD aarhus1.uni-c.dk 1.2 NetBSD 1.2 (AARHUS1) #15: Wed Oct 9 15:42:02 MET DST 1996 erik@aarhus1.uni-c.dk:/usr/src/sys/arch/pmax/compile/AARHUS1 pmax


>Description:
	Depending on your kernel options yet another couple of variables
	may be unused, therefore causing compilation warnings that abort
	kernel builds.
>How-To-Repeat:
>Fix:
Use same conditionals around variable definitions as around there
uses.
*** vm_machdep.c.orig	Wed Oct 16 10:29:38 1996
--- vm_machdep.c	Wed Oct 16 10:34:00 1996
***************
*** 184,190 ****
--- 184,192 ----
  cpu_exit(p)
  	register struct proc *p;
  {
+ #ifdef USER_LDT
  	struct pcb *pcb;
+ #endif
  	struct vmspace *vm;
  
  #if NNPX > 0
*** pcvt_kbd.c.orig	Wed Oct 16 10:29:32 1996
--- pcvt_kbd.c	Wed Oct 16 10:33:58 1996
***************
*** 104,110 ****
--- 104,112 ----
  static int	setkeydef ( struct kbd_ovlkey *data );
  static u_char *	xlatkey2ascii( U_short key );
  
+ #if !PCVT_NO_LED_UPDATE
  static int	ledstate  = 0;	/* keyboard led's */
+ #endif
  static int	tpmrate   = KBD_TPD500|KBD_TPM100;
  static u_char	altkpflag = 0;
  static u_short	altkpval  = 0;
>Audit-Trail:
>Unformatted: