Date: Sun, 3 Jun 2018 23:58:43 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: Rick Macklem <rmacklem@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334586 - head/sys/fs/nfsserver Message-ID: <2231964C-8130-416D-963D-77F93DF2F08A@FreeBSD.org> In-Reply-To: <201806031946.w53JkiHm084473@repo.freebsd.org> References: <201806031946.w53JkiHm084473@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_01C10913-2CF3-4271-ABB9-B9BA8952D58B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 3 Jun 2018, at 21:46, Rick Macklem <rmacklem@FreeBSD.org> wrote: >=20 > Author: rmacklem > Date: Sun Jun 3 19:46:44 2018 > New Revision: 334586 > URL: https://svnweb.freebsd.org/changeset/base/334586 >=20 > Log: > Fix a gcc8 warning about a write only variable. >=20 > 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. >=20 > Requested by: mmacy > MFC after: 2 weeks >=20 > Modified: > head/sys/fs/nfsserver/nfs_nfsdport.c >=20 > Modified: head/sys/fs/nfsserver/nfs_nfsdport.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- 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 =3D 0, getret =3D 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 =3D 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 =3D fxdr_hyper(tl); > tl +=3D 2; > +#if 0 > verf =3D fxdr_hyper(tl); > +#endif This functionally changes the code, though. Is fxdr_hyper() no longer supposed to be called? -Dimitry --Apple-Mail=_01C10913-2CF3-4271-ABB9-B9BA8952D58B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWxRkkwAKCRCwXqMKLiCW o0XdAJ0fRKuGePH3FJo0SXM8teDcYIJfJgCg2DvcL3Pj3626zidWL9LHHNloH3E= =rw8x -----END PGP SIGNATURE----- --Apple-Mail=_01C10913-2CF3-4271-ABB9-B9BA8952D58B--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2231964C-8130-416D-963D-77F93DF2F08A>