On Tue, Jan 04, 2022 at 08:42:29AM -0500, Dave Voutila wrote:
> 
> Claudio Jeker <cje...@diehard.n-r-g.com> writes:
> 
> > This are obvious and easy to fix unused but set variables.
> > There are more in vioscsi.c but those are actually used if compiled with
> > DEBUG set.
> 
> ok dv@, but maybe just nuke that fd variable in vioqcow2 instead?

I decided to go the other way since fd is used many times in that function.
I'm also fine with your diff.
 
> Index: vioqcow2.c
> ===================================================================
> RCS file: /opt/cvs/src/usr.sbin/vmd/vioqcow2.c,v
> retrieving revision 1.16
> diff -u -p -r1.16 vioqcow2.c
> --- vioqcow2.c        16 Jun 2021 16:55:02 -0000      1.16
> +++ vioqcow2.c        4 Jan 2022 13:30:09 -0000
> @@ -497,12 +497,10 @@ mkcluster(struct qcdisk *disk, struct qc
>  {
>       off_t l2sz, l1off, l2tab, l2off, cluster, clusteroff, orig;
>       uint64_t buf;
> -     int fd;
> 
>       pthread_rwlock_wrlock(&disk->lock);
> 
>       cluster = -1;
> -     fd = disk->fd;
>       /* L1 entries always exist */
>       l2sz = disk->clustersz / 8;
>       l1off = off / (disk->clustersz * l2sz);

-- 
:wq Claudio

Reply via email to