Subject: Re: __unused removal fallout (sys/ufs/ffs/ffs_snapshot.c)
To: None <current-users@NetBSD.org>
From: Jukka Salmi <j+nbsd@2006.salmi.ch>
List: current-users
Date: 11/16/2006 18:08:00
Patrick Welche --> current-users (2006-11-16 16:54:31 +0000):
> On Thu, Nov 16, 2006 at 05:11:29PM +0100, Jukka Salmi wrote:
> > Hi,
> > 
> > the latest change to src/sys/ufs/ffs/ffs_snapshot.c seems to cause a
> > kernel build failure for GENERIC_TINY:
> > 
> > $ ./build.sh [...] release
> > [...]
> > #   compile  GENERIC_TINY/ffs_snapshot.o
> > [...]
> > cc1: warnings being treated as errors
> > /usr/src/sys/ufs/ffs/ffs_snapshot.c:2023: warning: 'readvnblk' defined but not used
> > [...]
> 
> Yes, I see it too, but it's an odd one:

#if defined(FFS_NO_SNAPSHOT)
	return EOPNOTSUPP;
#else /* defined(FFS_NO_SNAPSHOT) */
[...]
> expunge_ufs1():
>         if (blkno != 0)
>                 error = readvnblk(snapvp, bf, lbn);      <----------
>         else
>                 error = readfsblk(snapvp, bf, lbn);
>         if (error) {
>                 free(bf, M_UFSMNT);
>                 return error;
>         }
[...]
#endif


Regards, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~