Date: Wed, 16 Mar 2016 15:01:56 +0100 From: Edward Tomasz Napierala <trasz@freebsd.org> To: Conrad Meyer <cem@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: <20160316140156.GA3846@brick.home> In-Reply-To: <CAG6CVpXPHfxuiVPhiwEWnCyoS8qSwYkZXTAtWBHdweA=TVH_TQ@mail.gmail.com> References: <201603152042.u2FKgafc073412@repo.freebsd.org> <CAG6CVpXPHfxuiVPhiwEWnCyoS8qSwYkZXTAtWBHdweA=TVH_TQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 > <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?20160316140156.GA3846>