aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zfeature.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/zfeature.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/zfeature.c')
-rw-r--r--module/zfs/zfeature.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/zfs/zfeature.c b/module/zfs/zfeature.c
index ed6ebcfc9..3757443a5 100644
--- a/module/zfs/zfeature.c
+++ b/module/zfs/zfeature.c
@@ -279,7 +279,7 @@ feature_get_refcount_from_disk(spa_t *spa, zfeature_info_t *feature,
static int
feature_get_enabled_txg(spa_t *spa, zfeature_info_t *feature, uint64_t *res)
{
- ASSERTV(uint64_t enabled_txg_obj = spa->spa_feat_enabled_txg_obj);
+ uint64_t enabled_txg_obj __maybe_unused = spa->spa_feat_enabled_txg_obj;
ASSERT(zfeature_depends_on(feature->fi_feature,
SPA_FEATURE_ENABLED_TXG));
@@ -397,9 +397,9 @@ feature_do_action(spa_t *spa, spa_feature_t fid, feature_action_t action,
{
uint64_t refcount = 0;
zfeature_info_t *feature = &spa_feature_table[fid];
- ASSERTV(uint64_t zapobj =
+ uint64_t zapobj __maybe_unused =
(feature->fi_flags & ZFEATURE_FLAG_READONLY_COMPAT) ?
- spa->spa_feat_for_write_obj : spa->spa_feat_for_read_obj);
+ spa->spa_feat_for_write_obj : spa->spa_feat_for_read_obj;
ASSERT(VALID_FEATURE_FID(fid));
ASSERT(0 != zapobj);