Subject: port-i386/5085: some lint cleanups in /src/sys/arch/i386/isa/pcvt/Util/keycap
To: None <gnats-bugs@gnats.netbsd.org>
From: None <frueauf@ira.uka.de>
List: netbsd-bugs
Date: 02/28/1998 15:45:55
>Number:         5085
>Category:       port-i386
>Synopsis:       some lint cleanups in /src/sys/arch/i386/isa/pcvt/Util/keycap
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 28 07:05:01 1998
>Last-Modified:
>Originator:     Thorsten Frueauf
>Organization:
private
	
>Release:        <NetBSD-current source date> NetBSD current (1.3D) 27.2.1998
>Environment:
	
System: NetBSD cyberlap 1.3D NetBSD 1.3D (CYBERLAP) #5: Thu Feb 26 05:54:23 MET 1998 frueauf@cyberlap:/src/sys/arch/i386/compile/CYBERLAP i386


>Description:
	
A recent change activated lint if one builds /src/sys/arch/i386/isa/pcvt/Util,
which results in errors for keycap.

>How-To-Repeat:
	
cd /src/sys/arch/i386/isa/pcvt/Util
make includes && make depend && make && make install

[...]
lint -chapbxz  -i /usr/src/sys/arch/i386/isa/pcvt/Util/keycap/keycap.c
keycap.c(116): KEYCAP_PATH undefined
keycap.c(38): warning: static variable id unused
keycap.c(76): warning: static variable pfp unused
*** Error code 1
[...]

>Fix:
	
Either disable lint check in the Makefile or apply the following patch to
/src/sys/arch/i386/isa/pcvt/Util/keycap/*, which fixes at least the errors,
some warnings stil remain though.

--- Makefile-orig	Mon Jun 23 13:21:11 1997
+++ Makefile	Sat Feb 28 15:23:25 1998
@@ -3,6 +3,7 @@
 CAPPATH	=	$(CAPDIR)/keycap.pcvt
 KEYCAPSRC=	keycap.src
 CFLAGS	+=	-DKEYCAP_PATH=\"$(CAPPATH)\"
+LINTFLAGS+=	-DKEYCAP_PATH=\"$(CAPPATH)\"
 SRCS	=	keycap.c
 
 NOMAN=	yes
--- keycap.c-orig	Fri Feb  7 13:20:40 1997
+++ keycap.c	Sat Feb 28 15:18:14 1998
@@ -35,8 +35,10 @@
  *
  */
 
+#ifndef lint
 static char *id =
 	"@(#)keycap.c, 3.20, Last Edit-Date: [Tue Dec 20 14:51:50 1994]";
+#endif
 
 /*---------------------------------------------------------------------------*
  *
@@ -73,7 +75,6 @@
 
 char	*getenv();
 
-static	FILE *pfp = NULL;	/* keycap data base file pointer */
 static	char *tbuf;
 static	int hopcount;		/* detect infinite loops in keycap, init 0 */
 
@@ -107,7 +108,6 @@
 	register int c;
 	register int i = 0, cnt = 0;
 	char ibuf[KEYCAP_BUFSIZ];
-	char *cp2;
 	int tf;
 
 	tbuf = bp;
>Audit-Trail:
>Unformatted:
some lint cleanups in /src/sys/arch/i386/isa/pcvt/Util/keycap