svn commit: r237496 - stable/9/sbin/growfs

Edward Tomasz Napierala trasz at FreeBSD.org
Sat Jun 23 18:54:25 UTC 2012


Author: trasz
Date: Sat Jun 23 18:54:24 2012
New Revision: 237496
URL: http://svn.freebsd.org/changeset/base/237496

Log:
  MFC r230289 by ed@:
  
  Allow growfs to be built with GCC 4.7 and -Werror.
  
  The dp1 variable is only used when FSIRAND is defined. Just place the
  variable behind #ifdefs entirely.

Modified:
  stable/9/sbin/growfs/growfs.c
Directory Properties:
  stable/9/sbin/growfs/   (props changed)

Modified: stable/9/sbin/growfs/growfs.c
==============================================================================
--- stable/9/sbin/growfs/growfs.c	Sat Jun 23 18:51:33 2012	(r237495)
+++ stable/9/sbin/growfs/growfs.c	Sat Jun 23 18:54:24 2012	(r237496)
@@ -374,7 +374,9 @@ initcg(int cylno, time_t modtime, int fs
 	static caddr_t iobuf;
 	long blkno, start;
 	ufs2_daddr_t i, cbase, dmax;
+#ifdef FSIRAND
 	struct ufs1_dinode *dp1;
+#endif
 	struct csum *cs;
 	uint d, dupper, dlower;
 
@@ -452,8 +454,8 @@ initcg(int cylno, time_t modtime, int fs
 		bzero(iobuf, sblock.fs_bsize);
 		for (i = 0; i < sblock.fs_ipg / INOPF(&sblock);
 		     i += sblock.fs_frag) {
-			dp1 = (struct ufs1_dinode *)(void *)iobuf;
 #ifdef FSIRAND
+			dp1 = (struct ufs1_dinode *)(void *)iobuf;
 			for (j = 0; j < INOPB(&sblock); j++) {
 				dp1->di_gen = random();
 				dp1++;


More information about the svn-src-stable-9 mailing list