tests: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835
This commit is contained in:
наб 2021-12-11 02:24:35 +01:00 committed by Brian Behlendorf
parent 1fedd01247
commit cf8d708b7a
14 changed files with 18 additions and 21 deletions

View File

@ -294,6 +294,7 @@ drain_tree(zfs_btree_t *bt, char *why)
static int static int
stress_tree(zfs_btree_t *bt, char *why) stress_tree(zfs_btree_t *bt, char *why)
{ {
(void) why;
avl_tree_t avl; avl_tree_t avl;
int_node_t *node; int_node_t *node;
struct timeval tp; struct timeval tp;

View File

@ -137,9 +137,9 @@ usage(char *name)
exit(1); exit(1);
} }
/* ARGSUSED */
static void static void
sigxfsz(int signo) sigxfsz(int signo)
{ {
(void) signo;
(void) printf("\nlargest_file: sigxfsz() caught SIGXFSZ\n"); (void) printf("\nlargest_file: sigxfsz() caught SIGXFSZ\n");
} }

View File

@ -52,6 +52,7 @@ do_sync_io(struct iocb *iocb)
int int
main(int argc, char **argv) main(int argc, char **argv)
{ {
(void) argc;
char *buf; char *buf;
int page_size = getpagesize(); int page_size = getpagesize();
int buf_size = strtol(argv[2], NULL, 0); int buf_size = strtol(argv[2], NULL, 0);

View File

@ -49,7 +49,7 @@
#include <strings.h> #include <strings.h>
int int
main(int argc, char *argvp[]) main(void)
{ {
int i = 1; int i = 1;

View File

@ -55,10 +55,10 @@ pickidx(void)
return (random() % 1000); return (random() % 1000);
} }
/* ARGSUSED */
static void * static void *
mover(void *a) mover(void *a)
{ {
(void) a;
char buf[256]; char buf[256];
int idx, len, ret; int idx, len, ret;
@ -75,10 +75,10 @@ mover(void *a)
return (NULL); return (NULL);
} }
/* ARGSUSED */
static void * static void *
cleaner(void *a) cleaner(void *a)
{ {
(void) a;
char buf[256]; char buf[256];
int idx, len, ret; int idx, len, ret;

View File

@ -96,12 +96,12 @@ static char script[PATH_MAX] = "/bin/true";
static char xattrbytes[XATTR_SIZE_MAX]; static char xattrbytes[XATTR_SIZE_MAX];
static int static int
usage(int argc, char **argv) usage(char *argv0)
{ {
fprintf(stderr, fprintf(stderr,
"usage: %s [-hvycdrRk] [-n <nth>] [-f <files>] [-x <xattrs>]\n" "usage: %s [-hvycdrRk] [-n <nth>] [-f <files>] [-x <xattrs>]\n"
" [-s <bytes>] [-p <path>] [-t <script> ] [-o <phase>]\n", " [-s <bytes>] [-p <path>] [-t <script> ] [-o <phase>]\n",
argv[0]); argv0);
fprintf(stderr, fprintf(stderr,
" --help -h This help\n" " --help -h This help\n"
@ -136,7 +136,7 @@ parse_args(int argc, char **argv)
while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) { while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
switch (c) { switch (c) {
case 'h': case 'h':
return (usage(argc, argv)); return (usage(argv[0]));
case 'v': case 'v':
verbose++; verbose++;
break; break;

View File

@ -146,9 +146,8 @@ ereports_dump(libzfs_handle_t *zhdl, int zevent_fd)
} }
} }
/* ARGSUSED */
int int
main(int argc, char **argv) main(void)
{ {
libzfs_handle_t *hdl; libzfs_handle_t *hdl;
int fd; int fd;

View File

@ -303,9 +303,8 @@ static timetest_t timetest_table[] = {
#define NCOMMAND (sizeof (timetest_table) / sizeof (timetest_table[0])) #define NCOMMAND (sizeof (timetest_table) / sizeof (timetest_table[0]))
/* ARGSUSED */
int int
main(int argc, char *argv[]) main(void)
{ {
int i, ret, fd; int i, ret, fd;
char *penv[] = {"TESTDIR", "TESTFILE0"}; char *penv[] = {"TESTDIR", "TESTFILE0"};

View File

@ -211,7 +211,7 @@ run_test(int i, hkdf_tv_t *tv)
} }
int int
main(int argc, char **argv) main(void)
{ {
int ret, i; int ret, i;

View File

@ -35,9 +35,8 @@
/* /*
* Check if libzfs works with more than 255 held file handles. * Check if libzfs works with more than 255 held file handles.
*/ */
/* ARGSUSED */
int int
main(int argc, char **argv) main(void)
{ {
int i; int i;
struct rlimit limit; struct rlimit limit;

View File

@ -31,15 +31,13 @@
static void static void
fill_random(char *buf, int len) fill_random(char *buf, int len)
{ {
int i;
srand(time(NULL)); srand(time(NULL));
for (i = 0; i < len; i++) { for (int i = 0; i < len; i++)
buf[i] = (char)rand(); buf[i] = (char)rand();
}
} }
int int
main(int argc, char *argv[]) main(void)
{ {
int i, fd; int i, fd;
char buf1[BSZ], buf2[BSZ] = {}; char buf1[BSZ], buf2[BSZ] = {};

View File

@ -25,7 +25,7 @@
*/ */
int int
main(int argc, char *argv[]) main(void)
{ {
int i, fd, ret; int i, fd, ret;
char spath[1024], dpath[1024]; char spath[1024], dpath[1024];

View File

@ -24,7 +24,7 @@
*/ */
int int
main(int argc, char *argv[]) main(void)
{ {
int i, fd; int i, fd;
char spath[1024], dpath[1024]; char spath[1024], dpath[1024];

View File

@ -110,7 +110,7 @@ test_stat_mode(mode_t mask)
} }
int int
main(int argc, char *argv[]) main(void)
{ {
fprintf(stdout, "Verify stat(2) for O_TMPFILE file considers umask.\n"); fprintf(stdout, "Verify stat(2) for O_TMPFILE file considers umask.\n");