mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +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
+1
-1
@@ -4664,7 +4664,7 @@ zdb_leak_fini(spa_t *spa, zdb_cb_t *zcb)
|
||||
vdev_t *rvd = spa->spa_root_vdev;
|
||||
for (unsigned c = 0; c < rvd->vdev_children; c++) {
|
||||
vdev_t *vd = rvd->vdev_child[c];
|
||||
ASSERTV(metaslab_group_t *mg = vd->vdev_mg);
|
||||
metaslab_group_t *mg __maybe_unused = vd->vdev_mg;
|
||||
|
||||
if (zcb->zcb_vd_obsolete_counts[c] != NULL) {
|
||||
leaks |= zdb_check_for_obsolete_leaks(vd, zcb);
|
||||
|
||||
Reference in New Issue
Block a user