aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev_cache.c
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-12-05 12:37:00 -0800
committerBrian Behlendorf <[email protected]>2019-12-05 12:37:00 -0800
commit2a8ba608d3eace43010174aa4f67c8b8af4aacf3 (patch)
treeb6393b38c9f31ee69fac7f42414b09ca900f2737 /module/zfs/vdev_cache.c
parent12395c7b0bbd2eaaae96d4105bdc83c3d0c73bec (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/vdev_cache.c')
-rw-r--r--module/zfs/vdev_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/vdev_cache.c b/module/zfs/vdev_cache.c
index 6cf449d4a..6e82184b8 100644
--- a/module/zfs/vdev_cache.c
+++ b/module/zfs/vdev_cache.c
@@ -254,7 +254,7 @@ vdev_cache_read(zio_t *zio)
vdev_cache_entry_t *ve, *ve_search;
uint64_t cache_offset = P2ALIGN(zio->io_offset, VCBS);
zio_t *fio;
- ASSERTV(uint64_t cache_phase = P2PHASE(zio->io_offset, VCBS));
+ uint64_t cache_phase __maybe_unused = P2PHASE(zio->io_offset, VCBS);
ASSERT3U(zio->io_type, ==, ZIO_TYPE_READ);