From c7e8e87accdb92758ee8a86c92f02d43b0a8ee7a Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Fri, 11 Mar 2022 18:47:09 +0000 Subject: [PATCH] Fix module build with -Werror This is a direct commit to zfs-2.1-release to fix release builds that error out on an unused variable. The issue is avoided on master by a huge series of commits that change how the ASSERT macros work, but that is not feasible to backport. Signed-off-by: Ryan Moeller --- module/zfs/arc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 9984c2d27534..47b58b6c2e0c 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -1205,7 +1205,7 @@ static void hdr_l2only_dest(void *vbuf, void *unused) { (void) unused; - arc_buf_hdr_t *hdr = vbuf; + arc_buf_hdr_t *hdr __maybe_unused = vbuf; ASSERT(HDR_EMPTY(hdr)); arc_space_return(HDR_L2ONLY_SIZE, ARC_SPACE_L2HDRS);