extfs: Remove unused variables.

Found by:	scan-build
Reviewed by:	fsu
Differential Revision:	https://reviews.freebsd.org/D14017
This commit is contained in:
Pedro F. Giffuni 2018-01-23 14:17:04 +00:00
parent ee0afaa9d7
commit 7d84ca677f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328280
3 changed files with 2 additions and 15 deletions

View File

@ -535,12 +535,11 @@ static uint32_t
ext2_ei_csum(struct inode *ip, struct ext2fs_dinode *ei)
{
struct m_ext2fs *fs;
uint16_t old_lo, old_hi;
uint16_t old_hi;
uint32_t inum, gen, crc;
fs = ip->i_e2fs;
old_lo = ei->e2di_chksum_lo;
ei->e2di_chksum_lo = 0;
if ((EXT2_INODE_SIZE(ip->i_e2fs) > E2FS_REV0_INODE_SIZE &&
ei->e2di_extra_isize >= EXT2_INODE_CSUM_HI_EXTRA_END)) {

View File

@ -125,10 +125,8 @@ ext4_ext_print_path(struct inode *ip, struct ext4_extent_path *path)
void
ext4_ext_print_extent_tree_status(struct inode * ip)
{
struct m_ext2fs *fs;
struct ext4_extent_header *ehp;
fs = ip->i_e2fs;
ehp = (struct ext4_extent_header *)(char *)ip->i_db;
printf("Extent status:ip=%d\n", ip->i_number);
@ -882,7 +880,6 @@ ext4_ext_grow_indepth(struct inode *ip, struct ext4_extent_path *path,
struct m_ext2fs *fs;
struct ext4_extent_path *curpath;
struct ext4_extent_header *neh;
struct ext4_extent_index *fidx;
struct buf *bp;
e4fs_daddr_t newblk;
int error = 0;
@ -925,7 +922,6 @@ ext4_ext_grow_indepth(struct inode *ip, struct ext4_extent_path *path,
ext4_index_store_pblock(curpath->ep_index, newblk);
neh = ext4_ext_inode_header(ip);
fidx = EXT_FIRST_INDEX(neh);
neh->eh_depth = path->ep_depth + 1;
ext4_ext_dirty(ip, curpath);
out:
@ -938,12 +934,9 @@ static int
ext4_ext_create_new_leaf(struct inode *ip, struct ext4_extent_path *path,
struct ext4_extent *newext)
{
struct m_ext2fs *fs;
struct ext4_extent_path *curpath;
int depth, i, error;
fs = ip->i_e2fs;
repeat:
i = depth = ext4_ext_inode_depth(ip);
@ -1033,13 +1026,11 @@ static int
ext4_ext_insert_extent(struct inode *ip, struct ext4_extent_path *path,
struct ext4_extent *newext)
{
struct m_ext2fs *fs;
struct ext4_extent_header * eh;
struct ext4_extent *ex, *nex, *nearex;
struct ext4_extent_path *npath;
int depth, len, error, next;
fs = ip->i_e2fs;
depth = ext4_ext_inode_depth(ip);
ex = path[depth].ep_ext;
npath = NULL;
@ -1166,11 +1157,9 @@ ext4_new_blocks(struct inode *ip, daddr_t lbn, e4fs_daddr_t pref,
struct ucred *cred, unsigned long *count, int *perror)
{
struct m_ext2fs *fs;
struct ext2mount *ump;
e4fs_daddr_t newblk;
fs = ip->i_e2fs;
ump = ip->i_ump;
/*
* We will allocate only single block for now.

View File

@ -869,8 +869,8 @@ ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp)
struct inode *dp;
struct ext2fs_direct_2 newdir;
struct buf *bp;
int error, newentrysize;
int DIRBLKSIZ = ip->i_e2fs->e2fs_bsize;
int error;
#ifdef INVARIANTS
@ -886,7 +886,6 @@ ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp)
else
newdir.e2d_type = EXT2_FT_UNKNOWN;
bcopy(cnp->cn_nameptr, newdir.e2d_name, (unsigned)cnp->cn_namelen + 1);
newentrysize = EXT2_DIR_REC_LEN(newdir.e2d_namlen);
if (ext2_htree_has_idx(dp)) {
error = ext2_htree_add_entry(dvp, &newdir, cnp);