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)
This commit is contained in:
Maxime Henrion 2004-04-03 23:30:59 +00:00
parent e5a88925de
commit b1fddb236f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=127818
2 changed files with 5 additions and 5 deletions

View File

@ -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 ***** */

View File

@ -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.