svn commit: r229209 - stable/9/usr.bin/rwho

Dimitry Andric dim at FreeBSD.org
Sun Jan 1 21:21:58 UTC 2012


Author: dim
Date: Sun Jan  1 21:21:57 2012
New Revision: 229209
URL: http://svn.freebsd.org/changeset/base/229209

Log:
  MFC r226427:
  
  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.

Modified:
  stable/9/usr.bin/rwho/Makefile
  stable/9/usr.bin/rwho/rwho.c
Directory Properties:
  stable/9/usr.bin/rwho/   (props changed)

Modified: stable/9/usr.bin/rwho/Makefile
==============================================================================
--- stable/9/usr.bin/rwho/Makefile	Sun Jan  1 21:12:29 2012	(r229208)
+++ stable/9/usr.bin/rwho/Makefile	Sun Jan  1 21:21:57 2012	(r229209)
@@ -3,6 +3,4 @@
 
 PROG=	rwho
 
-WARNS?=	1
-
 .include <bsd.prog.mk>

Modified: stable/9/usr.bin/rwho/rwho.c
==============================================================================
--- stable/9/usr.bin/rwho/rwho.c	Sun Jan  1 21:12:29 2012	(r229208)
+++ stable/9/usr.bin/rwho/rwho.c	Sun Jan  1 21:21:57 2012	(r229209)
@@ -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-stable-9 mailing list