summaryrefslogtreecommitdiff
path: root/test/test_shell.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-08-14 21:31:17 +0200
committerRichard Braun <rbraun@sceen.net>2018-08-14 21:31:17 +0200
commitde950994b2238c2568602dd2a7ac40e827e3d8c6 (patch)
treede7427774759f70c33fe173abd2ae87742cc6f6b /test/test_shell.c
parent204c453656ccab85f1af0bb35e1da34997e8c1c6 (diff)
Change the way unused arguments are handled
Use the __unused macro when declaring unused arguments in function definitions. Use main(void) instead of main(argc, argv) where appropriate.
Diffstat (limited to 'test/test_shell.c')
-rw-r--r--test/test_shell.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/test/test_shell.c b/test/test_shell.c
index 4593b0e..79dac6c 100644
--- a/test/test_shell.c
+++ b/test/test_shell.c
@@ -68,22 +68,16 @@ test_exit(void)
}
static void
-test_shell_exit(struct shell *shell, int argc, char *argv[])
+test_shell_exit(struct shell *shell __unused, int argc __unused,
+ char *argv[] __unused)
{
- (void)shell;
- (void)argc;
- (void)argv;
-
test_exit();
}
static void
-test_shell_top(struct shell *shell, int argc, char *argv[])
+test_shell_top(struct shell *shell __unused, int argc __unused,
+ char *argv[] __unused)
{
- (void)shell;
- (void)argc;
- (void)argv;
-
system("top");
}
@@ -123,7 +117,7 @@ static struct shell_cmd test_shell_cmds[] = {
};
int
-main(int argc, char *argv[])
+main(void)
{
struct test_iodev iodev;
struct termios termios;
@@ -131,9 +125,6 @@ main(int argc, char *argv[])
struct shell shell;
int ret;
- (void)argc;
- (void)argv;
-
test_iodev_init(&iodev, stdin, stdout);
shell_cmd_set_init(&cmd_set);
SHELL_REGISTER_CMDS(test_shell_cmds, &cmd_set);