From 2a8ba608d3eace43010174aa4f67c8b8af4aacf3 Mon Sep 17 00:00:00 2001 From: Matthew Macy Date: Thu, 5 Dec 2019 12:37:00 -0800 Subject: 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 Reviewed-by: Jorgen Lundman Signed-off-by: Matt Macy Closes #9671 --- module/zfs/zio_inject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/zfs/zio_inject.c') 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); -- cgit v1.2.3