aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2021-11-28 23:48:51 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2021-11-28 23:48:51 +0000
commit638b90a1911ab52e6bce1695e396bb307c806b62 (patch)
tree3ae40f7dd9cad1824a8df344d40501671b137022 /sys/fs
parent8fbae6c7bd63fca64b898843f63cb24269a7dd46 (diff)
downloadsrc-638b90a1911ab52e6bce1695e396bb307c806b62.tar.gz
src-638b90a1911ab52e6bce1695e396bb307c806b62.zip
nfs: Quiet a few "unused" warnings
For most of these warnings, the variable is loaded with data parsed out of an RPC messages. In case the data is useful in the future, I just marked these with __unused.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfs/nfs_commonsubs.c3
-rw-r--r--sys/fs/nfsserver/nfs_nfsdport.c2
-rw-r--r--sys/fs/nfsserver/nfs_nfsdserv.c4
3 files changed, 4 insertions, 5 deletions
diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c
index d3d572fe5a90..910f10eb1b4a 100644
--- a/sys/fs/nfs/nfs_commonsubs.c
+++ b/sys/fs/nfs/nfs_commonsubs.c
@@ -943,7 +943,7 @@ nfsm_fhtom(struct nfsrv_descript *nd, u_int8_t *fhp, int size, int set_true)
{
u_int32_t *tl;
u_int8_t *cp;
- int fullsiz, rem, bytesize = 0;
+ int fullsiz, bytesize = 0;
if (size == 0)
size = NFSX_MYFH;
@@ -960,7 +960,6 @@ nfsm_fhtom(struct nfsrv_descript *nd, u_int8_t *fhp, int size, int set_true)
case ND_NFSV3:
case ND_NFSV4:
fullsiz = NFSM_RNDUP(size);
- rem = fullsiz - size;
if (set_true) {
bytesize = 2 * NFSX_UNSIGNED + fullsiz;
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c
index 78151309896c..f06c2d5a6975 100644
--- a/sys/fs/nfsserver/nfs_nfsdport.c
+++ b/sys/fs/nfsserver/nfs_nfsdport.c
@@ -2307,7 +2307,7 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdgram,
int nlen, r, error = 0, getret = 1, usevget = 1;
int siz, cnt, fullsiz, eofflag, ncookies, entrycnt;
caddr_t bpos0, bpos1;
- u_int64_t off, toff, verf;
+ u_int64_t off, toff, verf __unused;
u_long *cookies = NULL, *cookiep;
nfsattrbit_t attrbits, rderrbits, savbits;
struct uio io;
diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c
index 4c5dade2c278..445ef2ad9e2b 100644
--- a/sys/fs/nfsserver/nfs_nfsdserv.c
+++ b/sys/fs/nfsserver/nfs_nfsdserv.c
@@ -5081,8 +5081,8 @@ nfsrvd_layoutstats(struct nfsrv_descript *nd, __unused int isdgram,
int cnt, error = 0;
int layouttype __unused;
char devid[NFSX_V4DEVICEID] __unused;
- uint64_t offset, len, readcount, readbytes, writecount, writebytes
- __unused;
+ uint64_t offset __unused, len __unused, readcount __unused;
+ uint64_t readbytes __unused, writecount __unused, writebytes __unused;
NFSM_DISSECT(tl, uint32_t *, 6 * NFSX_HYPER + NFSX_STATEID +
NFSX_V4DEVICEID + 2 * NFSX_UNSIGNED);