svn commit: r226427 - head/usr.bin/rwho

Ed Schouten ed at FreeBSD.org
Sun Oct 16 08:54:41 UTC 2011


Author: ed
Date: Sun Oct 16 08:54:41 2011
New Revision: 226427
URL: http://svn.freebsd.org/changeset/base/226427

Log:
  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

Modified:
  head/usr.bin/rwho/Makefile
  head/usr.bin/rwho/rwho.c

Modified: head/usr.bin/rwho/Makefile
==============================================================================
--- head/usr.bin/rwho/Makefile	Sun Oct 16 08:45:16 2011	(r226426)
+++ head/usr.bin/rwho/Makefile	Sun Oct 16 08:54:41 2011	(r226427)
@@ -3,6 +3,4 @@
 
 PROG=	rwho
 
-WARNS?=	1
-
 .include <bsd.prog.mk>

Modified: head/usr.bin/rwho/rwho.c
==============================================================================
--- head/usr.bin/rwho/rwho.c	Sun Oct 16 08:45:16 2011	(r226426)
+++ head/usr.bin/rwho/rwho.c	Sun Oct 16 08:54:41 2011	(r226427)
@@ -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,


More information about the svn-src-head mailing list