From 3f6ac2aecedd2171b877d1c5a52e58536d54998e Mon Sep 17 00:00:00 2001 From: agc Date: Wed, 14 Oct 1998 13:51:36 +0000 Subject: [PATCH] Clean up lint - one set but unused variable, 3 FALLTHROUGH comments needed, and two LP64-isms. --- lib/libterm/termcap.c | 10 ++++------ lib/libterm/tgoto.c | 10 +++++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/libterm/termcap.c b/lib/libterm/termcap.c index 6680cf358357..e26d8715f239 100644 --- a/lib/libterm/termcap.c +++ b/lib/libterm/termcap.c @@ -1,4 +1,4 @@ -/* $NetBSD: termcap.c,v 1.14 1998/07/27 01:57:25 mycroft Exp $ */ +/* $NetBSD: termcap.c,v 1.15 1998/10/14 13:51:36 agc Exp $ */ /* * Copyright (c) 1980, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)termcap.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: termcap.c,v 1.14 1998/07/27 01:57:25 mycroft Exp $"); +__RCSID("$NetBSD: termcap.c,v 1.15 1998/10/14 13:51:36 agc Exp $"); #endif #endif /* not lint */ @@ -84,11 +84,9 @@ tgetent(bp, name) int i; char pathbuf[PBUFSIZ]; /* holds raw path of filenames */ char *pathvec[PVECSIZ]; /* to point to names in pathbuf */ - char **pvec; /* holds usable tail of path vector */ char *termpath; fname = pathvec; - pvec = pathvec; tbuf = bp; p = pathbuf; cp = getenv("TERMCAP"); @@ -115,7 +113,7 @@ tgetent(bp, name) sizeof(pathbuf) - 1); /* $HOME first */ *p++ = '/'; } /* if no $HOME look in current directory */ - strncpy(p, _PATH_DEF, PBUFSIZ - (p - pathbuf)); + strncpy(p, _PATH_DEF, PBUFSIZ - (size_t)(p - pathbuf)); } } else /* user-defined name in TERMCAP */ @@ -177,7 +175,7 @@ tgetnum(id) long num; if (cgetnum(tbuf, id, &num) == 0) - return (num); + return (int)(num); else return (-1); } diff --git a/lib/libterm/tgoto.c b/lib/libterm/tgoto.c index d2046ac2c1bb..e05d2ba4d985 100644 --- a/lib/libterm/tgoto.c +++ b/lib/libterm/tgoto.c @@ -1,4 +1,4 @@ -/* $NetBSD: tgoto.c,v 1.10 1998/07/27 01:57:26 mycroft Exp $ */ +/* $NetBSD: tgoto.c,v 1.11 1998/10/14 13:51:37 agc Exp $ */ /* * Copyright (c) 1980, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)tgoto.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tgoto.c,v 1.10 1998/07/27 01:57:26 mycroft Exp $"); +__RCSID("$NetBSD: tgoto.c,v 1.11 1998/10/14 13:51:37 agc Exp $"); #endif #endif /* not lint */ @@ -119,7 +119,7 @@ copy: goto one; if (which < 100) goto two; - /* fall into... */ + /* FALLTHROUGH */ case '3': if (which >= 1000) @@ -128,7 +128,7 @@ copy: if (dp >= &result[MAXRETURNSIZE]) goto toohard; which %= 100; - /* fall into... */ + /* FALLTHROUGH */ case '2': two: @@ -156,7 +156,7 @@ setwhich: case '+': which += *cp++; - /* fall into... */ + /* FALLTHROUGH */ case '.': /*