From 9028f99a7949f44180931524ee366c136e01003b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Sun, 12 Dec 2021 15:34:00 +0100 Subject: [PATCH] libzutil: import: fix unused, remove argsused MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #12844 --- lib/libzutil/os/freebsd/zutil_device_path_os.c | 2 +- lib/libzutil/os/freebsd/zutil_import_os.c | 4 +++- lib/libzutil/os/linux/zutil_device_path_os.c | 2 +- lib/libzutil/os/linux/zutil_import_os.c | 6 ++++-- lib/libzutil/zutil_import.c | 1 + 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/libzutil/os/freebsd/zutil_device_path_os.c b/lib/libzutil/os/freebsd/zutil_device_path_os.c index 71c9360052..ac4748ec7a 100644 --- a/lib/libzutil/os/freebsd/zutil_device_path_os.c +++ b/lib/libzutil/os/freebsd/zutil_device_path_os.c @@ -124,9 +124,9 @@ zpool_label_disk_wait(const char *path, int timeout_ms) return (ENODEV); } -/* ARGSUSED */ boolean_t is_mpath_whole_disk(const char *path) { + (void) path; return (B_FALSE); } diff --git a/lib/libzutil/os/freebsd/zutil_import_os.c b/lib/libzutil/os/freebsd/zutil_import_os.c index 3da661f4c5..da9a7ded93 100644 --- a/lib/libzutil/os/freebsd/zutil_import_os.c +++ b/lib/libzutil/os/freebsd/zutil_import_os.c @@ -243,12 +243,14 @@ zpool_find_import_blkid(libpc_handle_t *hdl, pthread_mutex_t *lock, } int -zfs_dev_flush(int fd __unused) +zfs_dev_flush(int fd) { + (void) fd; return (0); } void update_vdevs_config_dev_sysfs_path(nvlist_t *config) { + (void) config; } diff --git a/lib/libzutil/os/linux/zutil_device_path_os.c b/lib/libzutil/os/linux/zutil_device_path_os.c index 13f8bd0316..17247233bc 100644 --- a/lib/libzutil/os/linux/zutil_device_path_os.c +++ b/lib/libzutil/os/linux/zutil_device_path_os.c @@ -668,10 +668,10 @@ is_mpath_whole_disk(const char *path) #else /* HAVE_LIBUDEV */ -/* ARGSUSED */ boolean_t is_mpath_whole_disk(const char *path) { + (void) path; return (B_FALSE); } diff --git a/lib/libzutil/os/linux/zutil_import_os.c b/lib/libzutil/os/linux/zutil_import_os.c index ab692401d8..60d3369c9c 100644 --- a/lib/libzutil/os/linux/zutil_import_os.c +++ b/lib/libzutil/os/linux/zutil_import_os.c @@ -560,17 +560,17 @@ udev_device_is_ready(struct udev_device *dev) #else -/* ARGSUSED */ int zfs_device_get_devid(struct udev_device *dev, char *bufptr, size_t buflen) { + (void) dev, (void) bufptr, (void) buflen; return (ENODATA); } -/* ARGSUSED */ int zfs_device_get_physical(struct udev_device *dev, char *bufptr, size_t buflen) { + (void) dev, (void) bufptr, (void) buflen; return (ENODATA); } @@ -788,6 +788,8 @@ update_vdev_config_dev_sysfs_path(nvlist_t *nv, char *path) static int sysfs_path_pool_vdev_iter_f(void *hdl_data, nvlist_t *nv, void *data) { + (void) hdl_data, (void) data; + char *path = NULL; if (nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) != 0) return (1); diff --git a/lib/libzutil/zutil_import.c b/lib/libzutil/zutil_import.c index 4d956fdd80..8876e7a7aa 100644 --- a/lib/libzutil/zutil_import.c +++ b/lib/libzutil/zutil_import.c @@ -1393,6 +1393,7 @@ static nvlist_t * zpool_find_import_impl(libpc_handle_t *hdl, importargs_t *iarg, pthread_mutex_t *lock, avl_tree_t *cache) { + (void) lock; nvlist_t *ret = NULL; pool_list_t pools = { 0 }; pool_entry_t *pe, *penext;