mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-26 12:12:13 +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
@@ -1768,7 +1768,7 @@ dmu_sync_late_arrival_done(zio_t *zio)
|
||||
zil_lwb_add_block(zgd->zgd_lwb, zgd->zgd_bp);
|
||||
|
||||
if (!BP_IS_HOLE(bp)) {
|
||||
ASSERTV(blkptr_t *bp_orig = &zio->io_bp_orig);
|
||||
blkptr_t *bp_orig __maybe_unused = &zio->io_bp_orig;
|
||||
ASSERT(!(zio->io_flags & ZIO_FLAG_NOPWRITE));
|
||||
ASSERT(BP_IS_HOLE(bp_orig) || !BP_EQUAL(bp, bp_orig));
|
||||
ASSERT(zio->io_bp->blk_birth == zio->io_txg);
|
||||
|
||||
Reference in New Issue
Block a user