summaryrefslogtreecommitdiffstats
path: root/sys/fs/ext2fs/ext2_inode.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-02-02 15:52:11 +0000
committerpfg <pfg@FreeBSD.org>2015-02-02 15:52:11 +0000
commitc6be6095bb848c7f98e661d0bf3a00d35ef23361 (patch)
treecf2bf2dc214ded76d0b093a60726cc497f05cdd8 /sys/fs/ext2fs/ext2_inode.c
parentba803d12f9dc33b4deaad98edb996907e62705da (diff)
downloadFreeBSD-src-c6be6095bb848c7f98e661d0bf3a00d35ef23361.zip
FreeBSD-src-c6be6095bb848c7f98e661d0bf3a00d35ef23361.tar.gz
MFC r277354, r277365:
ext2: Garbage-collect some unused variables Reported by: clang static analysis
Diffstat (limited to 'sys/fs/ext2fs/ext2_inode.c')
-rw-r--r--sys/fs/ext2fs/ext2_inode.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/fs/ext2fs/ext2_inode.c b/sys/fs/ext2fs/ext2_inode.c
index 43b0fc9..36768fb 100644
--- a/sys/fs/ext2fs/ext2_inode.c
+++ b/sys/fs/ext2fs/ext2_inode.c
@@ -115,16 +115,20 @@ ext2_truncate(struct vnode *vp, off_t length, int flags, struct ucred *cred,
struct inode *oip;
int32_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR];
uint32_t oldblks[NDADDR + NIADDR], newblks[NDADDR + NIADDR];
- struct bufobj *bo;
struct m_ext2fs *fs;
struct buf *bp;
int offset, size, level;
e4fs_daddr_t count, nblocks, blocksreleased = 0;
int error, i, allerror;
off_t osize;
+#ifdef INVARIANTS
+ struct bufobj *bo;
+#endif
oip = VTOI(ovp);
+#ifdef INVARIANTS
bo = &ovp->v_bufobj;
+#endif
ASSERT_VOP_LOCKED(vp, "ext2_truncate");
OpenPOWER on IntegriCloud