From c75216d258e46c3e5438d12d5d91608bd8bd22f8 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sun, 16 Oct 2011 08:54:41 +0000 Subject: [PATCH] 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 --- usr.bin/rwho/Makefile | 2 -- 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 aee9ff765f7..3fdc05d3b8f 100644 --- a/usr.bin/rwho/Makefile +++ b/usr.bin/rwho/Makefile @@ -3,6 +3,4 @@ PROG= rwho -WARNS?= 1 - .include diff --git a/usr.bin/rwho/rwho.c b/usr.bin/rwho/rwho.c index c0106c7c216..f134c1864f0 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,