mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Fix unused variable warning
The local mg variable is unused in non-debug builds. Wrap the variable in ASSERTV() so that it's only present in the debug build. Introduced by OpenZFS 7303. Reviewed-by: Don Brady <don.brady@intel.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #5616
This commit is contained in:
parent
040dab9939
commit
beabc5e46c
@ -2654,7 +2654,7 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)
|
|||||||
|
|
||||||
for (c = 0; c < rvd->vdev_children; c++) {
|
for (c = 0; c < rvd->vdev_children; c++) {
|
||||||
vdev_t *vd = rvd->vdev_child[c];
|
vdev_t *vd = rvd->vdev_child[c];
|
||||||
metaslab_group_t *mg = vd->vdev_mg;
|
ASSERTV(metaslab_group_t *mg = vd->vdev_mg);
|
||||||
for (m = 0; m < vd->vdev_ms_count; m++) {
|
for (m = 0; m < vd->vdev_ms_count; m++) {
|
||||||
metaslab_t *msp = vd->vdev_ms[m];
|
metaslab_t *msp = vd->vdev_ms[m];
|
||||||
ASSERT3P(msp->ms_group, ==, mg);
|
ASSERT3P(msp->ms_group, ==, mg);
|
||||||
@ -2713,7 +2713,7 @@ zdb_leak_fini(spa_t *spa)
|
|||||||
vdev_t *rvd = spa->spa_root_vdev;
|
vdev_t *rvd = spa->spa_root_vdev;
|
||||||
for (c = 0; c < rvd->vdev_children; c++) {
|
for (c = 0; c < rvd->vdev_children; c++) {
|
||||||
vdev_t *vd = rvd->vdev_child[c];
|
vdev_t *vd = rvd->vdev_child[c];
|
||||||
metaslab_group_t *mg = vd->vdev_mg;
|
ASSERTV(metaslab_group_t *mg = vd->vdev_mg);
|
||||||
for (m = 0; m < vd->vdev_ms_count; m++) {
|
for (m = 0; m < vd->vdev_ms_count; m++) {
|
||||||
metaslab_t *msp = vd->vdev_ms[m];
|
metaslab_t *msp = vd->vdev_ms[m];
|
||||||
ASSERT3P(mg, ==, msp->ms_group);
|
ASSERT3P(mg, ==, msp->ms_group);
|
||||||
|
Loading…
Reference in New Issue
Block a user