Re: svn commit: r333924 - head/sys/fs/nfsclient

2018-05-20 Thread Matthew Macy
I don't understand why you can't install the gcc8 package but here you go:
https://people.freebsd.org/~mmacy/gcc8logs/nfs-GENERIC-NODEBUG.log
https://people.freebsd.org/~mmacy/gcc8logs/nfs-GENERIC.log


On Sun, May 20, 2018 at 5:17 PM, Rick Macklem <rmack...@uoguelph.ca> wrote:
> I'm not in a situation where I can use gcc, but if you email me the
> list of warnings, I can look at them.
>
> rick
>
> 
> From: Matthew Macy <mm...@freebsd.org>
> Sent: Sunday, May 20, 2018 7:16:31 PM
> To: Rick Macklem
> Cc: src-committ...@freebsd.org; svn-src-...@freebsd.org; 
> svn-src-head@freebsd.org
> Subject: Re: svn commit: r333924 - head/sys/fs/nfsclient
>
> Actually if you could clean up the NFS code that would be great. It's
> _full_ of set but not used warnings. And anyone else reading this if
> you could clean up other areas. I've mostly cleaned up kern / net /
> netinet / iflib drivers.
>
>
> both
> WITHOUT_FORMAT_EXTENSIONS=  XCC=/usr/local/bin/gcc8 make -j buildkernel
>
> and
> WITHOUT_FORMAT_EXTENSIONS=  XCC=/usr/local/bin/gcc8 make -j
> buildkernel KERNCONF=GENERIC-NODEBUG
>
> Thanks.
>
> On Sun, May 20, 2018 at 4:09 PM, Matthew Macy <mm...@freebsd.org> wrote:
>> gcc8
>>
>> On Sun, May 20, 2018 at 15:14 Rick Macklem <rmack...@uoguelph.ca> wrote:
>>>
>>> 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
>>> these?
>>> 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
>>> this in
>>> the tree since I might need those argument flags later and might not
>>> remember
>>> 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
>>>
>>> ==
>>> --- 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 == 1, ("nfsm_uiotombuf: iovcnt != 1"));
>>> @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu
>>> clflg = 1;
>>> else
>>> clflg = 0;
>>> -   rem = NFSM_RNDUP(siz) - siz;
>>> if (clflg != 0)
>>> NFSMCLGET(mp, M_WAITOK);
>>> else
>>>
>>> Modified: head/sys/fs/nfsclient/nfs_clrpcops.c
>>>
>>> ==
>>> --- head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 05:59:42 2018
>>> (r333923)
>>> +++ head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 06:14:12 2018
>>> (r333924)
>>> @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop,
>>> nfsuint64
>>> KASSERT(uiop->uio_iovcnt == 1 &&
>>> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0,
>>> ("nfs readdirrpc bad uio"));
>>> -
>>> +   ncookie.lval[0] = ncookie.lval[1] = 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,
>>> nfsui
>>> KASSERT(uiop->uio_iovcnt == 1 &&
>>> 

Re: svn commit: r333924 - head/sys/fs/nfsclient

2018-05-20 Thread Rick Macklem
I'm not in a situation where I can use gcc, but if you email me the
list of warnings, I can look at them.

rick


From: Matthew Macy <mm...@freebsd.org>
Sent: Sunday, May 20, 2018 7:16:31 PM
To: Rick Macklem
Cc: src-committ...@freebsd.org; svn-src-...@freebsd.org; 
svn-src-head@freebsd.org
Subject: Re: svn commit: r333924 - head/sys/fs/nfsclient

Actually if you could clean up the NFS code that would be great. It's
_full_ of set but not used warnings. And anyone else reading this if
you could clean up other areas. I've mostly cleaned up kern / net /
netinet / iflib drivers.


both
WITHOUT_FORMAT_EXTENSIONS=  XCC=/usr/local/bin/gcc8 make -j buildkernel

and
WITHOUT_FORMAT_EXTENSIONS=  XCC=/usr/local/bin/gcc8 make -j
buildkernel KERNCONF=GENERIC-NODEBUG

Thanks.

On Sun, May 20, 2018 at 4:09 PM, Matthew Macy <mm...@freebsd.org> wrote:
> gcc8
>
> On Sun, May 20, 2018 at 15:14 Rick Macklem <rmack...@uoguelph.ca> wrote:
>>
>> 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
>> these?
>> 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
>> this in
>> the tree since I might need those argument flags later and might not
>> remember
>> 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
>>
>> ==
>> --- 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 == 1, ("nfsm_uiotombuf: iovcnt != 1"));
>> @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu
>> clflg = 1;
>> else
>> clflg = 0;
>> -   rem = NFSM_RNDUP(siz) - siz;
>> if (clflg != 0)
>> NFSMCLGET(mp, M_WAITOK);
>> else
>>
>> Modified: head/sys/fs/nfsclient/nfs_clrpcops.c
>>
>> ==
>> --- head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 05:59:42 2018
>> (r333923)
>> +++ head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 06:14:12 2018
>> (r333924)
>> @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop,
>> nfsuint64
>> KASSERT(uiop->uio_iovcnt == 1 &&
>> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0,
>> ("nfs readdirrpc bad uio"));
>> -
>> +   ncookie.lval[0] = ncookie.lval[1] = 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,
>> nfsui
>> KASSERT(uiop->uio_iovcnt == 1 &&
>> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0,
>> ("nfs readdirplusrpc bad uio"));
>> +   ncookie.lval[0] = ncookie.lval[1] = 0;
>> timespecclear();
>> *attrflagp = 0;
>> if (eofp != NULL)
>> @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp,
>> ui
>>
>> NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED);
>> len = fxdr_unsigned(uint32_t, *tl);
>> +   str = NULL;
>> if (len > NFSV4_OPAQUELIMIT) {
>> error = NFSERR_BADXDR;
>> goto nfsmout;
>> @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, c

Re: svn commit: r333924 - head/sys/fs/nfsclient

2018-05-20 Thread Matthew Macy
Actually if you could clean up the NFS code that would be great. It's
_full_ of set but not used warnings. And anyone else reading this if
you could clean up other areas. I've mostly cleaned up kern / net /
netinet / iflib drivers.


both
WITHOUT_FORMAT_EXTENSIONS=  XCC=/usr/local/bin/gcc8 make -j buildkernel

and
WITHOUT_FORMAT_EXTENSIONS=  XCC=/usr/local/bin/gcc8 make -j
buildkernel KERNCONF=GENERIC-NODEBUG

Thanks.

On Sun, May 20, 2018 at 4:09 PM, Matthew Macy  wrote:
> gcc8
>
> On Sun, May 20, 2018 at 15:14 Rick Macklem  wrote:
>>
>> 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
>> these?
>> 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
>> this in
>> the tree since I might need those argument flags later and might not
>> remember
>> 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
>>
>> ==
>> --- 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 == 1, ("nfsm_uiotombuf: iovcnt != 1"));
>> @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu
>> clflg = 1;
>> else
>> clflg = 0;
>> -   rem = NFSM_RNDUP(siz) - siz;
>> if (clflg != 0)
>> NFSMCLGET(mp, M_WAITOK);
>> else
>>
>> Modified: head/sys/fs/nfsclient/nfs_clrpcops.c
>>
>> ==
>> --- head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 05:59:42 2018
>> (r333923)
>> +++ head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 06:14:12 2018
>> (r333924)
>> @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop,
>> nfsuint64
>> KASSERT(uiop->uio_iovcnt == 1 &&
>> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0,
>> ("nfs readdirrpc bad uio"));
>> -
>> +   ncookie.lval[0] = ncookie.lval[1] = 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,
>> nfsui
>> KASSERT(uiop->uio_iovcnt == 1 &&
>> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0,
>> ("nfs readdirplusrpc bad uio"));
>> +   ncookie.lval[0] = ncookie.lval[1] = 0;
>> timespecclear();
>> *attrflagp = 0;
>> if (eofp != NULL)
>> @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp,
>> ui
>>
>> NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED);
>> len = fxdr_unsigned(uint32_t, *tl);
>> +   str = NULL;
>> if (len > NFSV4_OPAQUELIMIT) {
>> error = NFSERR_BADXDR;
>> goto nfsmout;
>> @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int
>> namel
>> struct nfsclsession *tsep;
>> nfsattrbit_t attrbits;
>> nfsv4stateid_t stateid;
>> -   uint32_t rflags;
>> struct nfsmount *nmp;
>>
>> nmp = VFSTONFS(dvp->v_mount);
>> @@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int
>> namel
>> stateid.other[0] = *tl++;
>> stateid.other[1] = *tl++;
>> stateid.other[2] = *tl;
>> -   rflags = fxdr_unsigned(u_int32_t, *(tl + 6));
>> nfsrv_getattrbits(nd, , NULL, NULL);
>> NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
>> deleg = fxdr_unsigned(int, *tl);
>>
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r333924 - head/sys/fs/nfsclient

2018-05-20 Thread Matthew Macy
gcc8

On Sun, May 20, 2018 at 15:14 Rick Macklem  wrote:

> 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
> these?
> 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
> this in
> the tree since I might need those argument flags later and might not
> remember
> 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
>
> ==
> --- 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 == 1, ("nfsm_uiotombuf: iovcnt != 1"));
> @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu
> clflg = 1;
> else
> clflg = 0;
> -   rem = NFSM_RNDUP(siz) - siz;
> if (clflg != 0)
> NFSMCLGET(mp, M_WAITOK);
> else
>
> Modified: head/sys/fs/nfsclient/nfs_clrpcops.c
>
> ==
> --- head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 05:59:42 2018
>   (r333923)
> +++ head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 06:14:12 2018
>   (r333924)
> @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop,
> nfsuint64
> KASSERT(uiop->uio_iovcnt == 1 &&
> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0,
> ("nfs readdirrpc bad uio"));
> -
> +   ncookie.lval[0] = ncookie.lval[1] = 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,
> nfsui
> KASSERT(uiop->uio_iovcnt == 1 &&
> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0,
> ("nfs readdirplusrpc bad uio"));
> +   ncookie.lval[0] = ncookie.lval[1] = 0;
> timespecclear();
> *attrflagp = 0;
> if (eofp != NULL)
> @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp,
> ui
>
> NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED);
> len = fxdr_unsigned(uint32_t, *tl);
> +   str = NULL;
> if (len > NFSV4_OPAQUELIMIT) {
> error = NFSERR_BADXDR;
> goto nfsmout;
> @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int
> namel
> struct nfsclsession *tsep;
> nfsattrbit_t attrbits;
> nfsv4stateid_t stateid;
> -   uint32_t rflags;
> struct nfsmount *nmp;
>
> nmp = VFSTONFS(dvp->v_mount);
> @@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int
> namel
> stateid.other[0] = *tl++;
> stateid.other[1] = *tl++;
> stateid.other[2] = *tl;
> -   rflags = fxdr_unsigned(u_int32_t, *(tl + 6));
> nfsrv_getattrbits(nd, , NULL, NULL);
> NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
> deleg = fxdr_unsigned(int, *tl);
>
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r333924 - head/sys/fs/nfsclient

2018-05-20 Thread Rick Macklem
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 these?
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 this in
the tree since I might need those argument flags later and might not remember
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
==
--- 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 == 1, ("nfsm_uiotombuf: iovcnt != 1"));
@@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu
clflg = 1;
else
clflg = 0;
-   rem = NFSM_RNDUP(siz) - siz;
if (clflg != 0)
NFSMCLGET(mp, M_WAITOK);
else

Modified: head/sys/fs/nfsclient/nfs_clrpcops.c
==
--- head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 05:59:42 2018
(r333923)
+++ head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 06:14:12 2018
(r333924)
@@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64
KASSERT(uiop->uio_iovcnt == 1 &&
(uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0,
("nfs readdirrpc bad uio"));
-
+   ncookie.lval[0] = ncookie.lval[1] = 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, nfsui
KASSERT(uiop->uio_iovcnt == 1 &&
(uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0,
("nfs readdirplusrpc bad uio"));
+   ncookie.lval[0] = ncookie.lval[1] = 0;
timespecclear();
*attrflagp = 0;
if (eofp != NULL)
@@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, ui

NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED);
len = fxdr_unsigned(uint32_t, *tl);
+   str = NULL;
if (len > NFSV4_OPAQUELIMIT) {
error = NFSERR_BADXDR;
goto nfsmout;
@@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namel
struct nfsclsession *tsep;
nfsattrbit_t attrbits;
nfsv4stateid_t stateid;
-   uint32_t rflags;
struct nfsmount *nmp;

nmp = VFSTONFS(dvp->v_mount);
@@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namel
stateid.other[0] = *tl++;
stateid.other[1] = *tl++;
stateid.other[2] = *tl;
-   rflags = fxdr_unsigned(u_int32_t, *(tl + 6));
nfsrv_getattrbits(nd, , NULL, NULL);
NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
deleg = fxdr_unsigned(int, *tl);

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333924 - head/sys/fs/nfsclient

2018-05-20 Thread Matt Macy
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

Modified:
  head/sys/fs/nfsclient/nfs_clcomsubs.c
  head/sys/fs/nfsclient/nfs_clrpcops.c

Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c
==
--- 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 == 1, ("nfsm_uiotombuf: iovcnt != 1"));
@@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu
clflg = 1;
else
clflg = 0;
-   rem = NFSM_RNDUP(siz) - siz;
if (clflg != 0)
NFSMCLGET(mp, M_WAITOK);
else

Modified: head/sys/fs/nfsclient/nfs_clrpcops.c
==
--- head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 05:59:42 2018
(r333923)
+++ head/sys/fs/nfsclient/nfs_clrpcops.cSun May 20 06:14:12 2018
(r333924)
@@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64
KASSERT(uiop->uio_iovcnt == 1 &&
(uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0,
("nfs readdirrpc bad uio"));
-
+   ncookie.lval[0] = ncookie.lval[1] = 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, nfsui
KASSERT(uiop->uio_iovcnt == 1 &&
(uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0,
("nfs readdirplusrpc bad uio"));
+   ncookie.lval[0] = ncookie.lval[1] = 0;
timespecclear();
*attrflagp = 0;
if (eofp != NULL)
@@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, ui
 
NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED);
len = fxdr_unsigned(uint32_t, *tl);
+   str = NULL;
if (len > NFSV4_OPAQUELIMIT) {
error = NFSERR_BADXDR;
goto nfsmout;
@@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namel
struct nfsclsession *tsep;
nfsattrbit_t attrbits;
nfsv4stateid_t stateid;
-   uint32_t rflags;
struct nfsmount *nmp;
 
nmp = VFSTONFS(dvp->v_mount);
@@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namel
stateid.other[0] = *tl++;
stateid.other[1] = *tl++;
stateid.other[2] = *tl;
-   rflags = fxdr_unsigned(u_int32_t, *(tl + 6));
nfsrv_getattrbits(nd, , NULL, NULL);
NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
deleg = fxdr_unsigned(int, *tl);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"