mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
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 <behlendorf1@llnl.gov> Reviewed-by: Jorgen Lundman <lundman@lundman.net> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #9671
This commit is contained in:
committed by
Brian Behlendorf
parent
12395c7b0b
commit
2a8ba608d3
@@ -421,7 +421,7 @@ vdev_indirect_should_condense(vdev_t *vd)
|
||||
* If nothing new has been marked obsolete, there is no
|
||||
* point in condensing.
|
||||
*/
|
||||
ASSERTV(uint64_t obsolete_sm_obj);
|
||||
uint64_t obsolete_sm_obj __maybe_unused;
|
||||
ASSERT0(vdev_obsolete_sm_object(vd, &obsolete_sm_obj));
|
||||
if (vd->vdev_obsolete_sm == NULL) {
|
||||
ASSERT0(obsolete_sm_obj);
|
||||
@@ -544,7 +544,7 @@ spa_condense_indirect_commit_sync(void *arg, dmu_tx_t *tx)
|
||||
{
|
||||
spa_condensing_indirect_t *sci = arg;
|
||||
uint64_t txg = dmu_tx_get_txg(tx);
|
||||
ASSERTV(spa_t *spa = dmu_tx_pool(tx)->dp_spa);
|
||||
spa_t *spa __maybe_unused = dmu_tx_pool(tx)->dp_spa;
|
||||
|
||||
ASSERT(dmu_tx_is_syncing(tx));
|
||||
ASSERT3P(sci, ==, spa->spa_condensing_indirect);
|
||||
@@ -815,7 +815,7 @@ void
|
||||
vdev_indirect_sync_obsolete(vdev_t *vd, dmu_tx_t *tx)
|
||||
{
|
||||
spa_t *spa = vd->vdev_spa;
|
||||
ASSERTV(vdev_indirect_config_t *vic = &vd->vdev_indirect_config);
|
||||
vdev_indirect_config_t *vic __maybe_unused = &vd->vdev_indirect_config;
|
||||
|
||||
ASSERT3U(vic->vic_mapping_object, !=, 0);
|
||||
ASSERT(range_tree_space(vd->vdev_obsolete_segments) > 0);
|
||||
@@ -1298,7 +1298,7 @@ vdev_indirect_read_all(zio_t *zio)
|
||||
static void
|
||||
vdev_indirect_io_start(zio_t *zio)
|
||||
{
|
||||
ASSERTV(spa_t *spa = zio->io_spa);
|
||||
spa_t *spa __maybe_unused = zio->io_spa;
|
||||
indirect_vsd_t *iv = kmem_zalloc(sizeof (*iv), KM_SLEEP);
|
||||
list_create(&iv->iv_splits,
|
||||
sizeof (indirect_split_t), offsetof(indirect_split_t, is_node));
|
||||
|
||||
Reference in New Issue
Block a user