Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Mar 2016 13:46:11 -0700
From:      Conrad Meyer <cem@FreeBSD.org>
To:        Edward Tomasz Napierala <trasz@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r296918 - head/sys/fs/autofs
Message-ID:  <CAG6CVpXPHfxuiVPhiwEWnCyoS8qSwYkZXTAtWBHdweA=TVH_TQ@mail.gmail.com>
In-Reply-To: <201603152042.u2FKgafc073412@repo.freebsd.org>
References:  <201603152042.u2FKgafc073412@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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
<trasz@freebsd.org> 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, &reclen);
> +       error = autofs_readdir_one(NULL, name, -1, &reclen);
> +       KASSERT(error == 0, ("autofs_readdir_one() failed"));
>
>         return (reclen);
>  }
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpXPHfxuiVPhiwEWnCyoS8qSwYkZXTAtWBHdweA=TVH_TQ>