mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +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
@@ -706,9 +706,9 @@ zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
|
||||
uint64_t end_size = MAX(zp->z_size, woff + n);
|
||||
zilog_t *zilog = zfsvfs->z_log;
|
||||
#ifdef HAVE_UIO_ZEROCOPY
|
||||
int i_iov = 0;
|
||||
const iovec_t *iovp = uio->uio_iov;
|
||||
ASSERTV(int iovcnt = uio->uio_iovcnt);
|
||||
int i_iov = 0;
|
||||
const iovec_t *iovp = uio->uio_iov;
|
||||
int iovcnt __maybe_unused = uio->uio_iovcnt;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user