Fix a gcc8 warning about a write only variable.

gcc8 warns that "verf" was set but not used. This was because the code
that uses it is disabled via a "#if 0".
This patch adds a "#if 0" to the variable's declaration and assignment
to get rid of the warning.
This way the code could be re-enabled without difficulty.

Requested by:	mmacy
MFC after:	2 weeks
This commit is contained in:
Rick Macklem 2018-06-03 19:46:44 +00:00
parent 2ce69a4d04
commit 12c7a494ad

View File

@ -1574,7 +1574,10 @@ nfsrvd_readdir(struct nfsrv_descript *nd, int isdgram,
struct nfsvattr at;
int nlen, error = 0, getret = 1;
int siz, cnt, fullsiz, eofflag, ncookies;
u_int64_t off, toff, verf;
u_int64_t off, toff;
#if 0
u_int64_t verf;
#endif
u_long *cookies = NULL, *cookiep;
struct uio io;
struct iovec iv;
@ -1591,7 +1594,9 @@ nfsrvd_readdir(struct nfsrv_descript *nd, int isdgram,
NFSM_DISSECT(tl, u_int32_t *, 5 * NFSX_UNSIGNED);
off = fxdr_hyper(tl);
tl += 2;
#if 0
verf = fxdr_hyper(tl);
#endif
tl += 2;
}
toff = off;