diff options
author | ed <ed@FreeBSD.org> | 2011-10-16 08:54:41 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2011-10-16 08:54:41 +0000 |
commit | e3855b1e6b906bd58299dc535cd7b21f4b87488c (patch) | |
tree | 3936adf9cb10e5fd7031edd84c773a4c9d0707ef | |
parent | fce2e9b3a185f780c5f23247b7bd742b320dd5b2 (diff) | |
download | FreeBSD-src-e3855b1e6b906bd58299dc535cd7b21f4b87488c.zip FreeBSD-src-e3855b1e6b906bd58299dc535cd7b21f4b87488c.tar.gz |
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
-rw-r--r-- | usr.bin/rwho/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/rwho/rwho.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/rwho/Makefile b/usr.bin/rwho/Makefile index aee9ff7..3fdc05d 100644 --- a/usr.bin/rwho/Makefile +++ b/usr.bin/rwho/Makefile @@ -3,6 +3,4 @@ PROG= rwho -WARNS?= 1 - .include <bsd.prog.mk> diff --git a/usr.bin/rwho/rwho.c b/usr.bin/rwho/rwho.c index c0106c7..f134c18 100644 --- a/usr.bin/rwho/rwho.c +++ b/usr.bin/rwho/rwho.c @@ -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, |