aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/sa.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/sa.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/sa.c')
-rw-r--r--module/zfs/sa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/sa.c b/module/zfs/sa.c
index cc2a681bd..557ab0949 100644
--- a/module/zfs/sa.c
+++ b/module/zfs/sa.c
@@ -1237,7 +1237,7 @@ sa_byteswap(sa_handle_t *hdl, sa_buf_type_t buftype)
dmu_buf_impl_t *db;
int num_lengths = 1;
int i;
- ASSERTV(sa_os_t *sa = hdl->sa_os->os_sa);
+ sa_os_t *sa __maybe_unused = hdl->sa_os->os_sa;
ASSERT(MUTEX_HELD(&sa->sa_lock));
if (sa_hdr_phys->sa_magic == SA_MAGIC)
@@ -1344,7 +1344,7 @@ sa_idx_tab_rele(objset_t *os, void *arg)
static void
sa_idx_tab_hold(objset_t *os, sa_idx_tab_t *idx_tab)
{
- ASSERTV(sa_os_t *sa = os->os_sa);
+ sa_os_t *sa __maybe_unused = os->os_sa;
ASSERT(MUTEX_HELD(&sa->sa_lock));
(void) zfs_refcount_add(&idx_tab->sa_refcount, NULL);