From e29560acd7a06ccb491fc271911fd9fb0589a593 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Mon, 20 Sep 2010 04:20:55 +0000 Subject: [PATCH] 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. --- sbin/growfs/growfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index bce4d59adc1c..2e057649a26c 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();