Date: Sun, 20 May 2018 22:14:53 +0000 From: Rick Macklem <rmacklem@uoguelph.ca> To: Matt Macy <mmacy@FreeBSD.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r333924 - head/sys/fs/nfsclient Message-ID: <YTOPR0101MB0953F8019AA9DB979B5CE0D0DD960@YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM> In-Reply-To: <201805200614.w4K6EC0L023252@repo.freebsd.org> References: <201805200614.w4K6EC0L023252@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Matt Macy wrote: >Author: mmacy >Date: Sun May 20 06:14:12 2018 >New Revision: 333924 >URL: https://svnweb.freebsd.org/changeset/base/333924 > >Log: > nfsclient: warnings cleanups Just wondering what compiler you are using. I haven't seen warnings for the= se? FYI, for the first two cases, ncookie is always set before it is used. For the third, "rflags" is set but not used. I sometimes leave code like th= is in the tree since I might need those argument flags later and might not rememb= er how to get them. In this case, similar code in other functions set "rflags"= in the same way, so it shouldn't be hard to crib the assignment from there. As such, I don't have a problem with deleting the code. rick ... the commit patch ... Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clcomsubs.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/nfsclient/nfs_clcomsubs.c Sun May 20 05:59:42 2018 = (r333923) +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 06:14:12 2018 = (r333924) @@ -354,7 +354,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu char *uiocp; struct mbuf *mp, *mp2, *firstmp; int xfer, left, mlen; - int uiosiz, clflg, rem; + int uiosiz, clflg; char *tcp; KASSERT(uiop->uio_iovcnt =3D=3D 1, ("nfsm_uiotombuf: iovcnt !=3D 1"= )); @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu clflg =3D 1; else clflg =3D 0; - rem =3D NFSM_RNDUP(siz) - siz; if (clflg !=3D 0) NFSMCLGET(mp, M_WAITOK); else Modified: head/sys/fs/nfsclient/nfs_clrpcops.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/nfsclient/nfs_clrpcops.c Sun May 20 05:59:42 2018 = (r333923) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun May 20 06:14:12 2018 = (r333924) @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint6= 4 KASSERT(uiop->uio_iovcnt =3D=3D 1 && (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) =3D=3D 0, ("nfs readdirrpc bad uio")); - + ncookie.lval[0] =3D ncookie.lval[1] =3D 0; /* * There is no point in reading a lot more than uio_resid, however * adding one additional DIRBLKSIZ makes sense. Since uio_resid @@ -3288,6 +3288,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsu= i KASSERT(uiop->uio_iovcnt =3D=3D 1 && (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) =3D=3D 0, ("nfs readdirplusrpc bad uio")); + ncookie.lval[0] =3D ncookie.lval[1] =3D 0; timespecclear(&dctime); *attrflagp =3D 0; if (eofp !=3D NULL) @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, u= i NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); len =3D fxdr_unsigned(uint32_t, *tl); + str =3D NULL; if (len > NFSV4_OPAQUELIMIT) { error =3D NFSERR_BADXDR; goto nfsmout; @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int name= l struct nfsclsession *tsep; nfsattrbit_t attrbits; nfsv4stateid_t stateid; - uint32_t rflags; struct nfsmount *nmp; nmp =3D VFSTONFS(dvp->v_mount); @@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int name= l stateid.other[0] =3D *tl++; stateid.other[1] =3D *tl++; stateid.other[2] =3D *tl; - rflags =3D fxdr_unsigned(u_int32_t, *(tl + 6)); nfsrv_getattrbits(nd, &attrbits, NULL, NULL); NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); deleg =3D fxdr_unsigned(int, *tl);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YTOPR0101MB0953F8019AA9DB979B5CE0D0DD960>