From 638b90a1911ab52e6bce1695e396bb307c806b62 Mon Sep 17 00:00:00 2001 From: Rick Macklem Date: Sun, 28 Nov 2021 15:48:51 -0800 Subject: 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. --- sys/fs/nfs/nfs_commonsubs.c | 3 +-- sys/fs/nfsserver/nfs_nfsdport.c | 2 +- sys/fs/nfsserver/nfs_nfsdserv.c | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'sys/fs') 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); -- cgit v1.2.3