summaryrefslogtreecommitdiffstats
path: root/sbin/growfs/growfs.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2010-09-20 04:20:55 +0000
committermarcel <marcel@FreeBSD.org>2010-09-20 04:20:55 +0000
commite3d05690361abbb1b04fac7e25bb62d95a7b6d36 (patch)
treeda835ee84e13451f120d2e911db89e6275149c87 /sbin/growfs/growfs.c
parentec0b99e7f0f65e9161c5baf6c115e6bf1ee2da41 (diff)
downloadFreeBSD-src-e3d05690361abbb1b04fac7e25bb62d95a7b6d36.zip
FreeBSD-src-e3d05690361abbb1b04fac7e25bb62d95a7b6d36.tar.gz
Unbreak the build on strong-aligned architectures (arm, ia64).
Casting from (char *) to (struct ufs1_dinode *) changes the alignment requirement of the pointer and GCC does not know that the pointer is adequately aligned (due to malloc(3)), and warns about it. Cast to (void *) first to by-pass the check.
Diffstat (limited to 'sbin/growfs/growfs.c')
-rw-r--r--sbin/growfs/growfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c
index bce4d59a..2e05764 100644
--- a/sbin/growfs/growfs.c
+++ b/sbin/growfs/growfs.c
@@ -452,7 +452,7 @@ initcg(int cylno, time_t utime, 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 *)iobuf;
+ dp1 = (struct ufs1_dinode *)(void *)iobuf;
#ifdef FSIRAND
for (j = 0; j < INOPB(&sblock); j++) {
dp1->di_gen = random();
OpenPOWER on IntegriCloud