From 31247c78b15aefeac5d395109209ca8a99ff5d60 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 3 Nov 2022 13:58:38 -0400 Subject: [PATCH] FreeBSD: get_zfs_ioctl_version() should be cast to (void) FreeBSD's Coverity scans complain that we ignore the return value. There is no need to check the return value so we cast it to (void) to suppress further complaints by static analyzers. Reported-by: Coverity (CID 1018175) Reviewed-by: Brian Behlendorf Reviewed-by: szubersk Reviewed-by: Alexander Motin Signed-off-by: Richard Yao Closes #14136 --- lib/libzfs_core/os/freebsd/libzfs_core_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libzfs_core/os/freebsd/libzfs_core_ioctl.c b/lib/libzfs_core/os/freebsd/libzfs_core_ioctl.c index 72f8f39303..76778b3652 100644 --- a/lib/libzfs_core/os/freebsd/libzfs_core_ioctl.c +++ b/lib/libzfs_core/os/freebsd/libzfs_core_ioctl.c @@ -38,7 +38,7 @@ get_zfs_ioctl_version(void) int ver = ZFS_IOCVER_NONE; ver_size = sizeof (ver); - sysctlbyname("vfs.zfs.version.ioctl", &ver, &ver_size, NULL, 0); + (void) sysctlbyname("vfs.zfs.version.ioctl", &ver, &ver_size, NULL, 0); return (ver); }