svn commit: r230289 - head/sbin/growfs
Ed Schouten
ed at FreeBSD.org
Tue Jan 17 22:19:36 UTC 2012
Author: ed
Date: Tue Jan 17 22:19:35 2012
New Revision: 230289
URL: http://svn.freebsd.org/changeset/base/230289
Log:
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:
head/sbin/growfs/growfs.c
Modified: head/sbin/growfs/growfs.c
==============================================================================
--- head/sbin/growfs/growfs.c Tue Jan 17 22:17:11 2012 (r230288)
+++ head/sbin/growfs/growfs.c Tue Jan 17 22:19:35 2012 (r230289)
@@ -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-head
mailing list