diff options
author | Matthew Macy <[email protected]> | 2019-12-05 12:37:00 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-12-05 12:37:00 -0800 |
commit | 2a8ba608d3eace43010174aa4f67c8b8af4aacf3 (patch) | |
tree | b6393b38c9f31ee69fac7f42414b09ca900f2737 /module/zfs/dnode_sync.c | |
parent | 12395c7b0bbd2eaaae96d4105bdc83c3d0c73bec (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/dnode_sync.c')
-rw-r--r-- | module/zfs/dnode_sync.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/zfs/dnode_sync.c b/module/zfs/dnode_sync.c index 4e002d326..5df395a6f 100644 --- a/module/zfs/dnode_sync.c +++ b/module/zfs/dnode_sync.c @@ -422,11 +422,11 @@ dnode_sync_free_range_impl(dnode_t *dn, uint64_t blkid, uint64_t nblks, * match. */ if (trunc && !dn->dn_objset->os_raw_receive) { - ASSERTV(uint64_t off); + uint64_t off __maybe_unused; dn->dn_phys->dn_maxblkid = blkid == 0 ? 0 : blkid - 1; - ASSERTV(off = (dn->dn_phys->dn_maxblkid + 1) * - (dn->dn_phys->dn_datablkszsec << SPA_MINBLOCKSHIFT)); + off = (dn->dn_phys->dn_maxblkid + 1) * + (dn->dn_phys->dn_datablkszsec << SPA_MINBLOCKSHIFT); ASSERT(off < dn->dn_phys->dn_maxblkid || dn->dn_phys->dn_maxblkid == 0 || dnode_next_offset(dn, 0, &off, 1, 1, 0) != 0); @@ -628,7 +628,7 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) dnode_phys_t *dnp = dn->dn_phys; int txgoff = tx->tx_txg & TXG_MASK; list_t *list = &dn->dn_dirty_records[txgoff]; - ASSERTV(static const dnode_phys_t zerodn = { 0 }); + static const dnode_phys_t zerodn __maybe_unused = { 0 }; boolean_t kill_spill = B_FALSE; ASSERT(dmu_tx_is_syncing(tx)); |