Clean up lint - one set but unused variable, 3 FALLTHROUGH comments needed,

and two LP64-isms.
This commit is contained in:
agc 1998-10-14 13:51:36 +00:00
parent 773dc968ad
commit 3f6ac2aece
2 changed files with 9 additions and 11 deletions

View File

@ -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);
}

View File

@ -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 '.':
/*