Re: svn commit: r296918 - head/sys/fs/autofs

2016-03-19 Thread Baptiste Daroussin
On Wed, Mar 16, 2016 at 03:01:56PM +0100, Edward Tomasz Napierala wrote:
> You're right.  I've added the explicit cast to void, let's see
> if that helps.
> 
> On 0315T1346, Conrad Meyer wrote:
> > Instead you will get, "warning: unused but set variable 'error'" on
> > -NODEBUG builds.  Maybe add:
> > 
> > (void)error;

Why everyone keeps casting when we have __unused?

Bapt


signature.asc
Description: PGP signature


Re: svn commit: r296918 - head/sys/fs/autofs

2016-03-18 Thread Edward Tomasz Napierala
You're right.  I've added the explicit cast to void, let's see
if that helps.

On 0315T1346, Conrad Meyer wrote:
> Instead you will get, "warning: unused but set variable 'error'" on
> -NODEBUG builds.  Maybe add:
> 
> (void)error;
> 
> Best,
> Conrad
> 
> On Tue, Mar 15, 2016 at 1:42 PM, Edward Tomasz Napierala
>  wrote:
> > Author: trasz
> > Date: Tue Mar 15 20:42:36 2016
> > New Revision: 296918
> > URL: https://svnweb.freebsd.org/changeset/base/296918
> >
> > Log:
> >   Pacify Coverity.
> >
> >   MFC after:1 month
> >   Sponsored by: The FreeBSD Foundation
> >
> > Modified:
> >   head/sys/fs/autofs/autofs_vnops.c
> >
> > Modified: head/sys/fs/autofs/autofs_vnops.c
> > ==
> > --- head/sys/fs/autofs/autofs_vnops.c   Tue Mar 15 19:45:24 2016
> > (r296917)
> > +++ head/sys/fs/autofs/autofs_vnops.c   Tue Mar 15 20:42:36 2016
> > (r296918)
> > @@ -370,8 +370,10 @@ static size_t
> >  autofs_dirent_reclen(const char *name)
> >  {
> > size_t reclen;
> > +   int error;
> >
> > -   autofs_readdir_one(NULL, name, -1, );
> > +   error = autofs_readdir_one(NULL, name, -1, );
> > +   KASSERT(error == 0, ("autofs_readdir_one() failed"));
> >
> > return (reclen);
> >  }
> >
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r296918 - head/sys/fs/autofs

2016-03-15 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Mar 15 20:42:36 2016
New Revision: 296918
URL: https://svnweb.freebsd.org/changeset/base/296918

Log:
  Pacify Coverity.
  
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/fs/autofs/autofs_vnops.c

Modified: head/sys/fs/autofs/autofs_vnops.c
==
--- head/sys/fs/autofs/autofs_vnops.c   Tue Mar 15 19:45:24 2016
(r296917)
+++ head/sys/fs/autofs/autofs_vnops.c   Tue Mar 15 20:42:36 2016
(r296918)
@@ -370,8 +370,10 @@ static size_t
 autofs_dirent_reclen(const char *name)
 {
size_t reclen;
+   int error;
 
-   autofs_readdir_one(NULL, name, -1, );
+   error = autofs_readdir_one(NULL, name, -1, );
+   KASSERT(error == 0, ("autofs_readdir_one() failed"));
 
return (reclen);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r296918 - head/sys/fs/autofs

2016-03-15 Thread Conrad Meyer
Instead you will get, "warning: unused but set variable 'error'" on
-NODEBUG builds.  Maybe add:

(void)error;

Best,
Conrad

On Tue, Mar 15, 2016 at 1:42 PM, Edward Tomasz Napierala
 wrote:
> Author: trasz
> Date: Tue Mar 15 20:42:36 2016
> New Revision: 296918
> URL: https://svnweb.freebsd.org/changeset/base/296918
>
> Log:
>   Pacify Coverity.
>
>   MFC after:1 month
>   Sponsored by: The FreeBSD Foundation
>
> Modified:
>   head/sys/fs/autofs/autofs_vnops.c
>
> Modified: head/sys/fs/autofs/autofs_vnops.c
> ==
> --- head/sys/fs/autofs/autofs_vnops.c   Tue Mar 15 19:45:24 2016
> (r296917)
> +++ head/sys/fs/autofs/autofs_vnops.c   Tue Mar 15 20:42:36 2016
> (r296918)
> @@ -370,8 +370,10 @@ static size_t
>  autofs_dirent_reclen(const char *name)
>  {
> size_t reclen;
> +   int error;
>
> -   autofs_readdir_one(NULL, name, -1, );
> +   error = autofs_readdir_one(NULL, name, -1, );
> +   KASSERT(error == 0, ("autofs_readdir_one() failed"));
>
> return (reclen);
>  }
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"