From b62829295e9529d1c321816a1027fac5afc7d6f5 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Wed, 25 May 2022 20:26:59 -0400 Subject: [PATCH] Silence unused-but-set-variable warning This was breaking the kmod port build on FreeBSD with Clang 13. Use the same trick as we do for ASSERT() to make DNODE_VERIFY() use its parameter at compile time without actually using it at run time in non-debug builds. Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #13507 --- include/sys/dnode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/dnode.h b/include/sys/dnode.h index 3f5fcc958c..33d9389d5a 100644 --- a/include/sys/dnode.h +++ b/include/sys/dnode.h @@ -616,7 +616,7 @@ extern dnode_stats_t dnode_stats; #else #define dprintf_dnode(db, fmt, ...) -#define DNODE_VERIFY(dn) +#define DNODE_VERIFY(dn) ((void) sizeof ((uintptr_t)(dn))) #define FREE_VERIFY(db, start, end, tx) #endif