Silence newer gcc warnings.

Newer versions of gcc generate "set, but not used" warnings in the NFS server.
Add __unused macros to silence these warnings.

Requested by:	mmacy
This commit is contained in:
Rick Macklem 2018-07-29 21:51:17 +00:00
parent 27744ca71c
commit 8014c97147
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336878
3 changed files with 3 additions and 3 deletions

View File

@ -1799,7 +1799,7 @@ nfsrvd_readdir(struct nfsrv_descript *nd, int isdgram,
struct nfsvattr at; struct nfsvattr at;
int nlen, error = 0, getret = 1; int nlen, error = 0, getret = 1;
int siz, cnt, fullsiz, eofflag, ncookies; int siz, cnt, fullsiz, eofflag, ncookies;
u_int64_t off, toff, verf; u_int64_t off, toff, verf __unused;
u_long *cookies = NULL, *cookiep; u_long *cookies = NULL, *cookiep;
struct uio io; struct uio io;
struct iovec iv; struct iovec iv;

View File

@ -3852,7 +3852,7 @@ nfsrvd_openattr(struct nfsrv_descript *nd, __unused int isdgram,
__unused NFSPROC_T *p, __unused struct nfsexstuff *exp) __unused NFSPROC_T *p, __unused struct nfsexstuff *exp)
{ {
u_int32_t *tl; u_int32_t *tl;
int error = 0, createdir; int error = 0, createdir __unused;
NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
createdir = fxdr_unsigned(int, *tl); createdir = fxdr_unsigned(int, *tl);

View File

@ -5765,7 +5765,7 @@ nfsrv_localunlock(vnode_t vp, struct nfslockfile *lfp, uint64_t init_first,
uint64_t init_end, NFSPROC_T *p) uint64_t init_end, NFSPROC_T *p)
{ {
struct nfslock *lop; struct nfslock *lop;
uint64_t first, end, prevfirst; uint64_t first, end, prevfirst __unused;
first = init_first; first = init_first;
end = init_end; end = init_end;