svn commit: r334586 - head/sys/fs/nfsserver
Dimitry Andric
dim at FreeBSD.org
Sun Jun 3 21:58:57 UTC 2018
On 3 Jun 2018, at 21:46, Rick Macklem <rmacklem at FreeBSD.org> wrote:
>
> Author: rmacklem
> Date: Sun Jun 3 19:46:44 2018
> New Revision: 334586
> URL: https://svnweb.freebsd.org/changeset/base/334586
>
> Log:
> 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
>
> Modified:
> head/sys/fs/nfsserver/nfs_nfsdport.c
>
> Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
> ==============================================================================
> --- head/sys/fs/nfsserver/nfs_nfsdport.c Sun Jun 3 19:37:17 2018 (r334585)
> +++ head/sys/fs/nfsserver/nfs_nfsdport.c Sun Jun 3 19:46:44 2018 (r334586)
> @@ -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
This functionally changes the code, though. Is fxdr_hyper() no longer
supposed to be called?
-Dimitry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 223 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20180603/6f7f22f2/attachment.sig>
More information about the svn-src-all
mailing list