From 3ceb77014140048b34d596cd4fa16086beebf04f Mon Sep 17 00:00:00 2001 From: mux Date: Sat, 3 Apr 2004 23:30:59 +0000 Subject: 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) --- sbin/growfs/growfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sbin/growfs') 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 ***** */ -- cgit v1.1