Build finger(1) with WARNS=6.

This commit is contained in:
Ed Schouten 2011-10-14 07:24:23 +00:00
parent cdd36f96b2
commit c5d693c5d0
2 changed files with 1 additions and 3 deletions

View File

@ -5,6 +5,4 @@ PROG= finger
SRCS= finger.c lprint.c net.c sprint.c util.c
MAN= finger.1 finger.conf.5
WARNS?= 2
.include <bsd.prog.mk>

View File

@ -306,7 +306,7 @@ show_text(const char *directory, const char *file_name, const char *header)
return(0);
/* If short enough, and no newlines, show it on a single line.*/
if (sb.st_size <= LINE_LEN - strlen(header) - 5) {
if (sb.st_size <= (off_t)(LINE_LEN - strlen(header) - 5)) {
nr = read(fd, tbuf, sizeof(tbuf));
if (nr <= 0) {
(void)close(fd);