diff options
author | Richard Braun <rbraun@sceen.net> | 2018-08-14 21:31:17 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2018-08-14 21:31:17 +0200 |
commit | de950994b2238c2568602dd2a7ac40e827e3d8c6 (patch) | |
tree | de7427774759f70c33fe173abd2ae87742cc6f6b /test/test_shell.c | |
parent | 204c453656ccab85f1af0bb35e1da34997e8c1c6 (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.c | 19 |
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); |