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
stress_tree(zfs_btree_t *bt, char *why)
{
(void) why;
avl_tree_t avl;
int_node_t *node;
struct timeval tp;

View File

@ -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");
}

View File

@ -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);

View File

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

View File

@ -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;

View File

@ -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 <nth>] [-f <files>] [-x <xattrs>]\n"
" [-s <bytes>] [-p <path>] [-t <script> ] [-o <phase>]\n",
argv[0]);
argv0);
fprintf(stderr,
" --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) {
switch (c) {
case 'h':
return (usage(argc, argv));
return (usage(argv[0]));
case 'v':
verbose++;
break;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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