aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorJohn Birrell <jb@FreeBSD.org>2007-11-20 01:55:37 +0000
committerJohn Birrell <jb@FreeBSD.org>2007-11-20 01:55:37 +0000
commit56589eb7b4e2d85fddbd8f50c3df405db77c1e6f (patch)
tree6f6dee59fed6dddb7927e892cf21170be7379893 /sbin
parent102c7c92999b70a04b58b4506aba62701f195b1a (diff)
downloadsrc-56589eb7b4e2d85fddbd8f50c3df405db77c1e6f.tar.gz
src-56589eb7b4e2d85fddbd8f50c3df405db77c1e6f.zip
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.
Notes
Notes: svn path=/head/; revision=173764
Diffstat (limited to 'sbin')
-rw-r--r--sbin/clri/clri.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/clri/clri.c b/sbin/clri/clri.c
index dc77a41c66d5..ff41d1a57cbe 100644
--- a/sbin/clri/clri.c
+++ b/sbin/clri/clri.c
@@ -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. */