Use an intermediate pointer to avoid strict alias check warnings
on gcc 4.2. This is required for tinderbox which doesn't have -f-no-strict-aliasing in it's custom CFLAGS.
This commit is contained in:
parent
19b2cc7319
commit
2693df297e
@ -81,6 +81,7 @@ main(int argc, char *argv[])
|
||||
off_t offset;
|
||||
int i, fd, inonum;
|
||||
char *fs, sblock[SBLOCKSIZE];
|
||||
void *v = ibuf;
|
||||
|
||||
if (argc < 3)
|
||||
usage();
|
||||
@ -128,7 +129,7 @@ main(int argc, char *argv[])
|
||||
|
||||
if (sbp->fs_magic == FS_UFS2_MAGIC) {
|
||||
/* get the inode within the block. */
|
||||
dp2 = &(((struct ufs2_dinode *)ibuf)
|
||||
dp2 = &(((struct ufs2_dinode *)v)
|
||||
[ino_to_fsbo(sbp, inonum)]);
|
||||
|
||||
/* clear the inode, and bump the generation count. */
|
||||
@ -137,7 +138,7 @@ main(int argc, char *argv[])
|
||||
dp2->di_gen = generation;
|
||||
} else {
|
||||
/* get the inode within the block. */
|
||||
dp1 = &(((struct ufs1_dinode *)ibuf)
|
||||
dp1 = &(((struct ufs1_dinode *)v)
|
||||
[ino_to_fsbo(sbp, inonum)]);
|
||||
|
||||
/* clear the inode, and bump the generation count. */
|
||||
|
Loading…
Reference in New Issue
Block a user