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.
This commit is contained in:
parent
da0483096d
commit
e29560acd7
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user