Build rwho(1) with WARNS=6.

The only reason why it didn't build with WARNS=6, is because of some
simple to fix string formatting bugs.

MFC after:	3 months
This commit is contained in:
Ed Schouten 2011-10-16 08:54:41 +00:00
parent 1e47e0ca1b
commit c75216d258
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226427
2 changed files with 3 additions and 4 deletions

View file

@ -3,6 +3,4 @@
PROG= rwho
WARNS?= 1
.include <bsd.prog.mk>

View file

@ -165,9 +165,10 @@ main(int argc, char *argv[])
d_first ? "%e %b %R" : "%b %e %R",
localtime(&t));
(void)sprintf(buf, "%s:%-.*s", mp->myhost,
sizeof(mp->myutmp.out_line), mp->myutmp.out_line);
(int)sizeof(mp->myutmp.out_line), mp->myutmp.out_line);
printf("%-*.*s %-*s %s",
sizeof(mp->myutmp.out_name), sizeof(mp->myutmp.out_name),
(int)sizeof(mp->myutmp.out_name),
(int)sizeof(mp->myutmp.out_name),
mp->myutmp.out_name,
width,
buf,