summaryrefslogtreecommitdiffstats
path: root/module/zfs/zio_inject.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/zio_inject.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/zio_inject.c')
-rw-r--r--module/zfs/zio_inject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zio_inject.c b/module/zfs/zio_inject.c
index d8af503bd..fb8ce0916 100644
--- a/module/zfs/zio_inject.c
+++ b/module/zfs/zio_inject.c
@@ -339,7 +339,7 @@ zio_handle_label_injection(zio_t *zio, int error)
static int
zio_inject_bitflip_cb(void *data, size_t len, void *private)
{
- ASSERTV(zio_t *zio = private);
+ zio_t *zio __maybe_unused = private;
uint8_t *buffer = data;
uint_t byte = spa_get_random(len);