Date: Tue, 17 Jan 2012 22:19:35 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r230289 - head/sbin/growfs Message-ID: <201201172219.q0HMJZ0I010134@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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++;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201172219.q0HMJZ0I010134>