Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Aug 2018 04:46:03 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r337447 - head/sys/fs/fuse
Message-ID:  <201808080446.w784k3K3001499@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Wed Aug  8 04:46:03 2018
New Revision: 337447
URL: https://svnweb.freebsd.org/changeset/base/337447

Log:
  FUSE: Remove some set-but-not-used variables
  
  No functional change.

Modified:
  head/sys/fs/fuse/fuse_file.c
  head/sys/fs/fuse/fuse_vfsops.c
  head/sys/fs/fuse/fuse_vnops.c

Modified: head/sys/fs/fuse/fuse_file.c
==============================================================================
--- head/sys/fs/fuse/fuse_file.c	Wed Aug  8 03:46:12 2018	(r337446)
+++ head/sys/fs/fuse/fuse_file.c	Wed Aug  8 04:46:03 2018	(r337447)
@@ -102,7 +102,6 @@ fuse_filehandle_open(struct vnode *vp,
 	struct fuse_open_out *foo;
 
 	int err = 0;
-	int isdir = 0;
 	int oflags = 0;
 	int op = FUSE_OPEN;
 
@@ -120,7 +119,6 @@ fuse_filehandle_open(struct vnode *vp,
 	oflags = fuse_filehandle_xlate_to_oflags(fufh_type);
 
 	if (vnode_isdir(vp)) {
-		isdir = 1;
 		op = FUSE_OPENDIR;
 		if (fufh_type != FUFH_RDONLY) {
 			printf("FUSE:non-rdonly fh requested for a directory?\n");
@@ -172,7 +170,6 @@ fuse_filehandle_close(struct vnode *vp,
 	struct fuse_filehandle *fufh = NULL;
 
 	int err = 0;
-	int isdir = 0;
 	int op = FUSE_RELEASE;
 
 	fuse_trace_printf("fuse_filehandle_put(vp=%p, fufh_type=%d)\n",
@@ -187,10 +184,8 @@ fuse_filehandle_close(struct vnode *vp,
 	if (fuse_isdeadfs(vp)) {
 		goto out;
 	}
-	if (vnode_isdir(vp)) {
+	if (vnode_isdir(vp))
 		op = FUSE_RELEASEDIR;
-		isdir = 1;
-	}
 	fdisp_init(&fdi, sizeof(*fri));
 	fdisp_make_vp(&fdi, op, vp, td, cred);
 	fri = fdi.indata;

Modified: head/sys/fs/fuse/fuse_vfsops.c
==============================================================================
--- head/sys/fs/fuse/fuse_vfsops.c	Wed Aug  8 03:46:12 2018	(r337446)
+++ head/sys/fs/fuse/fuse_vfsops.c	Wed Aug  8 04:46:03 2018	(r337447)
@@ -209,7 +209,6 @@ fuse_vfsop_mount(struct mount *mp)
 	int err;
 
 	uint64_t mntopts, __mntopts;
-	int max_read_set;
 	uint32_t max_read;
 	int daemon_timeout;
 	int fd;
@@ -224,7 +223,6 @@ fuse_vfsop_mount(struct mount *mp)
 	struct vfsoptlist *opts;
 
 	subtype = NULL;
-	max_read_set = 0;
 	max_read = ~0;
 	err = 0;
 	mntopts = 0;
@@ -277,8 +275,7 @@ fuse_vfsop_mount(struct mount *mp)
 	FUSE_FLAGOPT(no_mmap, FSESS_NO_MMAP);
 	FUSE_FLAGOPT(brokenio, FSESS_BROKENIO);
 
-	if (vfs_scanopt(opts, "max_read=", "%u", &max_read) == 1)
-		max_read_set = 1;
+	(void)vfs_scanopt(opts, "max_read=", "%u", &max_read);
 	if (vfs_scanopt(opts, "timeout=", "%u", &daemon_timeout) == 1) {
 		if (daemon_timeout < FUSE_MIN_DAEMON_TIMEOUT)
 			daemon_timeout = FUSE_MIN_DAEMON_TIMEOUT;

Modified: head/sys/fs/fuse/fuse_vnops.c
==============================================================================
--- head/sys/fs/fuse/fuse_vnops.c	Wed Aug  8 03:46:12 2018	(r337446)
+++ head/sys/fs/fuse/fuse_vnops.c	Wed Aug  8 04:46:03 2018	(r337447)
@@ -1249,7 +1249,6 @@ fuse_vnop_readdir(struct vop_readdir_args *ap)
 	struct ucred *cred = ap->a_cred;
 
 	struct fuse_filehandle *fufh = NULL;
-	struct fuse_vnode_data *fvdat;
 	struct fuse_iov cookediov;
 
 	int err = 0;
@@ -1264,7 +1263,6 @@ fuse_vnop_readdir(struct vop_readdir_args *ap)
 	    (uio_resid(uio) < sizeof(struct dirent))) {
 		return EINVAL;
 	}
-	fvdat = VTOFUD(vp);
 
 	if (!fuse_filehandle_valid(vp, FUFH_RDONLY)) {
 		FS_DEBUG("calling readdir() before open()");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808080446.w784k3K3001499>