1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-22 11:17:19 +00:00

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.
This commit is contained in:
Ed Schouten 2012-01-17 22:19:35 +00:00
parent ca4bfcbc21
commit 11dc480601
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=230289

View File

@ -374,7 +374,9 @@ initcg(int cylno, time_t modtime, int fso, unsigned int Nflag)
static caddr_t iobuf; static caddr_t iobuf;
long blkno, start; long blkno, start;
ufs2_daddr_t i, cbase, dmax; ufs2_daddr_t i, cbase, dmax;
#ifdef FSIRAND
struct ufs1_dinode *dp1; struct ufs1_dinode *dp1;
#endif
struct csum *cs; struct csum *cs;
uint d, dupper, dlower; uint d, dupper, dlower;
@ -452,8 +454,8 @@ initcg(int cylno, time_t modtime, int fso, unsigned int Nflag)
bzero(iobuf, sblock.fs_bsize); bzero(iobuf, sblock.fs_bsize);
for (i = 0; i < sblock.fs_ipg / INOPF(&sblock); for (i = 0; i < sblock.fs_ipg / INOPF(&sblock);
i += sblock.fs_frag) { i += sblock.fs_frag) {
dp1 = (struct ufs1_dinode *)(void *)iobuf;
#ifdef FSIRAND #ifdef FSIRAND
dp1 = (struct ufs1_dinode *)(void *)iobuf;
for (j = 0; j < INOPB(&sblock); j++) { for (j = 0; j < INOPB(&sblock); j++) {
dp1->di_gen = random(); dp1->di_gen = random();
dp1++; dp1++;