diff options
author | Matthew Macy <[email protected]> | 2019-12-05 12:37:00 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-12-05 12:37:00 -0800 |
commit | 2a8ba608d3eace43010174aa4f67c8b8af4aacf3 (patch) | |
tree | b6393b38c9f31ee69fac7f42414b09ca900f2737 /module/zfs/zio.c | |
parent | 12395c7b0bbd2eaaae96d4105bdc83c3d0c73bec (diff) |
Replace ASSERTV macro with compiler annotation
Remove the ASSERTV macro and handle suppressing unused
compiler warnings for variables only in ASSERTs using the
__attribute__((unused)) compiler annotation. The annotation
is understood by both gcc and clang.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Jorgen Lundman <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #9671
Diffstat (limited to 'module/zfs/zio.c')
-rw-r--r-- | module/zfs/zio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/zio.c b/module/zfs/zio.c index 1ac2f52bb..4ec4bb691 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -2550,7 +2550,7 @@ zio_write_gang_member_ready(zio_t *zio) dva_t *cdva = zio->io_bp->blk_dva; dva_t *pdva = pio->io_bp->blk_dva; uint64_t asize; - ASSERTV(zio_t *gio = zio->io_gang_leader); + zio_t *gio __maybe_unused = zio->io_gang_leader; if (BP_IS_HOLE(zio->io_bp)) return; @@ -4184,7 +4184,7 @@ zio_ready(zio_t *zio) static void zio_dva_throttle_done(zio_t *zio) { - ASSERTV(zio_t *lio = zio->io_logical); + zio_t *lio __maybe_unused = zio->io_logical; zio_t *pio = zio_unique_parent(zio); vdev_t *vd = zio->io_vd; int flags = METASLAB_ASYNC_ALLOC; |