summaryrefslogtreecommitdiffstats
path: root/module/zfs/txg.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/txg.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/txg.c')
-rw-r--r--module/zfs/txg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/txg.c b/module/zfs/txg.c
index e972bcc25..8d1c2a5c8 100644
--- a/module/zfs/txg.c
+++ b/module/zfs/txg.c
@@ -813,7 +813,7 @@ txg_sync_waiting(dsl_pool_t *dp)
void
txg_verify(spa_t *spa, uint64_t txg)
{
- ASSERTV(dsl_pool_t *dp = spa_get_dsl(spa));
+ dsl_pool_t *dp __maybe_unused = spa_get_dsl(spa);
if (txg <= TXG_INITIAL || txg == ZILTEST_TXG)
return;
ASSERT3U(txg, <=, dp->dp_tx.tx_open_txg);