mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +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:
parent
ca4bfcbc21
commit
11dc480601
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=230289
@ -374,7 +374,9 @@ initcg(int cylno, time_t modtime, int fso, unsigned int Nflag)
|
||||
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 fso, unsigned int Nflag)
|
||||
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++;
|
||||
|
Loading…
Reference in New Issue
Block a user