diff options
author | mux <mux@FreeBSD.org> | 2004-04-03 23:30:59 +0000 |
---|---|---|
committer | mux <mux@FreeBSD.org> | 2004-04-03 23:30:59 +0000 |
commit | 3ceb77014140048b34d596cd4fa16086beebf04f (patch) | |
tree | 2667ff6d3b3a5354421cff89025b0aa25a9e1463 | |
parent | 73bd4f76df4a97f43778a9b501c2d26b08643aa7 (diff) | |
download | FreeBSD-src-3ceb77014140048b34d596cd4fa16086beebf04f.zip FreeBSD-src-3ceb77014140048b34d596cd4fa16086beebf04f.tar.gz |
Fix the remaining warnings of growfs(8) on my sparc64 box with
WARNS=6. I don't change the WARNS level in the Makefile because I
didn't tested this on other archs.
The fs.h fix was suggested by: marcel
Reviewed by: md5(1)
-rw-r--r-- | sbin/growfs/growfs.c | 8 | ||||
-rw-r--r-- | sys/ufs/ffs/fs.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index 93de327..b3477e6 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -1854,10 +1854,10 @@ ginode(ino_t inumber, int fsi, int cg) } DBG_LEAVE; if (sblock.fs_magic == FS_UFS1_MAGIC) - return ((union dinode *) - &((struct ufs1_dinode *)inobuf)[inumber % INOPB(&sblock)]); - return ((union dinode *) - &((struct ufs2_dinode *)inobuf)[inumber % INOPB(&sblock)]); + return (union dinode *)((uintptr_t)inobuf + + (inumber % INOPB(&sblock)) * sizeof(struct ufs1_dinode)); + return (union dinode *)((uintptr_t)inobuf + + (inumber % INOPB(&sblock)) * sizeof(struct ufs2_dinode)); } /* ****************************************************** charsperline ***** */ diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h index dc68435..5f53e1e 100644 --- a/sys/ufs/ffs/fs.h +++ b/sys/ufs/ffs/fs.h @@ -484,7 +484,7 @@ struct cg { #define cg_clustersfree(cgp) \ ((u_int8_t *)((u_int8_t *)(cgp) + (cgp)->cg_clusteroff)) #define cg_clustersum(cgp) \ - ((int32_t *)((u_int8_t *)(cgp) + (cgp)->cg_clustersumoff)) + ((int32_t *)((uintptr_t)(cgp) + (cgp)->cg_clustersumoff)) /* * Turn filesystem block numbers into disk block addresses. |