From f1095951aaa378e5c4cf70f869a76f63c899cb87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Sat, 11 Dec 2021 02:24:35 +0100 Subject: [PATCH] tests: 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 #12835 --- tests/zfs-tests/cmd/btree_test/btree_test.c | 1 + tests/zfs-tests/cmd/largest_file/largest_file.c | 2 +- tests/zfs-tests/cmd/mmap_libaio/mmap_libaio.c | 1 + tests/zfs-tests/cmd/rename_dir/rename_dir.c | 2 +- .../zfs-tests/cmd/rm_lnkcnt_zero_file/rm_lnkcnt_zero_file.c | 4 ++-- tests/zfs-tests/cmd/xattrtest/xattrtest.c | 6 +++--- .../tests/functional/cli_root/zpool_events/ereports.c | 3 +-- tests/zfs-tests/tests/functional/ctime/ctime.c | 3 +-- tests/zfs-tests/tests/functional/hkdf/hkdf_test.c | 2 +- tests/zfs-tests/tests/functional/libzfs/many_fds.c | 3 +-- tests/zfs-tests/tests/functional/tmpfile/tmpfile_001_pos.c | 6 ++---- tests/zfs-tests/tests/functional/tmpfile/tmpfile_002_pos.c | 2 +- tests/zfs-tests/tests/functional/tmpfile/tmpfile_003_pos.c | 2 +- .../zfs-tests/tests/functional/tmpfile/tmpfile_stat_mode.c | 2 +- 14 files changed, 18 insertions(+), 21 deletions(-) diff --git a/tests/zfs-tests/cmd/btree_test/btree_test.c b/tests/zfs-tests/cmd/btree_test/btree_test.c index 8de14ff2a266..aaad4e47e464 100644 --- a/tests/zfs-tests/cmd/btree_test/btree_test.c +++ b/tests/zfs-tests/cmd/btree_test/btree_test.c @@ -294,6 +294,7 @@ drain_tree(zfs_btree_t *bt, char *why) static int stress_tree(zfs_btree_t *bt, char *why) { + (void) why; avl_tree_t avl; int_node_t *node; struct timeval tp; diff --git a/tests/zfs-tests/cmd/largest_file/largest_file.c b/tests/zfs-tests/cmd/largest_file/largest_file.c index 00e1019cc8e4..912607640965 100644 --- a/tests/zfs-tests/cmd/largest_file/largest_file.c +++ b/tests/zfs-tests/cmd/largest_file/largest_file.c @@ -137,9 +137,9 @@ usage(char *name) exit(1); } -/* ARGSUSED */ static void sigxfsz(int signo) { + (void) signo; (void) printf("\nlargest_file: sigxfsz() caught SIGXFSZ\n"); } diff --git a/tests/zfs-tests/cmd/mmap_libaio/mmap_libaio.c b/tests/zfs-tests/cmd/mmap_libaio/mmap_libaio.c index 21119ebca9d6..a02f46d91b30 100644 --- a/tests/zfs-tests/cmd/mmap_libaio/mmap_libaio.c +++ b/tests/zfs-tests/cmd/mmap_libaio/mmap_libaio.c @@ -52,6 +52,7 @@ do_sync_io(struct iocb *iocb) int main(int argc, char **argv) { + (void) argc; char *buf; int page_size = getpagesize(); int buf_size = strtol(argv[2], NULL, 0); diff --git a/tests/zfs-tests/cmd/rename_dir/rename_dir.c b/tests/zfs-tests/cmd/rename_dir/rename_dir.c index 5f80f7229462..897ec7b84148 100644 --- a/tests/zfs-tests/cmd/rename_dir/rename_dir.c +++ b/tests/zfs-tests/cmd/rename_dir/rename_dir.c @@ -49,7 +49,7 @@ #include int -main(int argc, char *argvp[]) +main(void) { int i = 1; diff --git a/tests/zfs-tests/cmd/rm_lnkcnt_zero_file/rm_lnkcnt_zero_file.c b/tests/zfs-tests/cmd/rm_lnkcnt_zero_file/rm_lnkcnt_zero_file.c index e262ecefea92..f8b6e3e808bb 100644 --- a/tests/zfs-tests/cmd/rm_lnkcnt_zero_file/rm_lnkcnt_zero_file.c +++ b/tests/zfs-tests/cmd/rm_lnkcnt_zero_file/rm_lnkcnt_zero_file.c @@ -55,10 +55,10 @@ pickidx(void) return (random() % 1000); } -/* ARGSUSED */ static void * mover(void *a) { + (void) a; char buf[256]; int idx, len, ret; @@ -75,10 +75,10 @@ mover(void *a) return (NULL); } -/* ARGSUSED */ static void * cleaner(void *a) { + (void) a; char buf[256]; int idx, len, ret; diff --git a/tests/zfs-tests/cmd/xattrtest/xattrtest.c b/tests/zfs-tests/cmd/xattrtest/xattrtest.c index 0b68126c0327..49b6629ba056 100644 --- a/tests/zfs-tests/cmd/xattrtest/xattrtest.c +++ b/tests/zfs-tests/cmd/xattrtest/xattrtest.c @@ -96,12 +96,12 @@ static char script[PATH_MAX] = "/bin/true"; static char xattrbytes[XATTR_SIZE_MAX]; static int -usage(int argc, char **argv) +usage(char *argv0) { fprintf(stderr, "usage: %s [-hvycdrRk] [-n ] [-f ] [-x ]\n" " [-s ] [-p ] [-t