Author: marcel
Date: Mon Sep 20 04:20:55 2010
New Revision: 212886
URL: http://svn.freebsd.org/changeset/base/212886

Log:
  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.

Modified:
  head/sbin/growfs/growfs.c

Modified: head/sbin/growfs/growfs.c
==============================================================================
--- head/sbin/growfs/growfs.c   Sun Sep 19 21:56:41 2010        (r212885)
+++ head/sbin/growfs/growfs.c   Mon Sep 20 04:20:55 2010        (r212886)
@@ -452,7 +452,7 @@ initcg(int cylno, time_t utime, int fso,
                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();
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to