From 6d00b5e13699c946a3f78c73defe5ff1e18264a3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 18 Oct 2016 10:44:44 -0700 Subject: [PATCH] Fix unused variable Accidentally introduced by 3dfb57a, when building with debugging disabled several variables are unused. Resolve this by wrapping them in ASSERTV to remove them for non-debug builds. Reviewed by: Don Brady Signed-off-by: Brian Behlendorf Closes #5284 --- module/zfs/zio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/zfs/zio.c b/module/zfs/zio.c index 0147cb17c..e1fa543da 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -1064,7 +1064,7 @@ zio_vdev_child_io(zio_t *pio, blkptr_t *bp, vdev_t *vd, uint64_t offset, */ if (flags & ZIO_FLAG_IO_ALLOCATING && (vd != vd->vdev_top || (flags & ZIO_FLAG_IO_RETRY))) { - metaslab_class_t *mc = spa_normal_class(pio->io_spa); + ASSERTV(metaslab_class_t *mc = spa_normal_class(pio->io_spa)); ASSERT(mc->mc_alloc_throttle_enabled); ASSERT(type == ZIO_TYPE_WRITE); @@ -3555,10 +3555,10 @@ zio_ready(zio_t *zio) static void zio_dva_throttle_done(zio_t *zio) { - zio_t *lio = zio->io_logical; zio_t *pio = zio_unique_parent(zio); vdev_t *vd = zio->io_vd; int flags = METASLAB_ASYNC_ALLOC; + ASSERTV(zio_t *lio = zio->io_logical); ASSERT3P(zio->io_bp, !=, NULL); ASSERT3U(zio->io_type, ==, ZIO_TYPE_WRITE); -- 2.40.0