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
@@ -3354,7 +3354,7 @@ metaslab_passivate_allocator(metaslab_group_t *mg, metaslab_t *msp,
|
||||
static void
|
||||
metaslab_passivate(metaslab_t *msp, uint64_t weight)
|
||||
{
|
||||
ASSERTV(uint64_t size = weight & ~METASLAB_WEIGHT_TYPE);
|
||||
uint64_t size __maybe_unused = weight & ~METASLAB_WEIGHT_TYPE;
|
||||
|
||||
/*
|
||||
* If size < SPA_MINBLOCKSIZE, then we will not allocate from
|
||||
@@ -5959,7 +5959,7 @@ static void
|
||||
metaslab_check_free_impl(vdev_t *vd, uint64_t offset, uint64_t size)
|
||||
{
|
||||
metaslab_t *msp;
|
||||
ASSERTV(spa_t *spa = vd->vdev_spa);
|
||||
spa_t *spa __maybe_unused = vd->vdev_spa;
|
||||
|
||||
if ((zfs_flags & ZFS_DEBUG_ZIO_FREE) == 0)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user