aboutsummaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 72186f970..5b5a54241 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -538,8 +538,8 @@ static int run_list(struct pipe *pi);
538#define pseudo_exec_argv(ptrs2free, argv) pseudo_exec_argv(argv) 538#define pseudo_exec_argv(ptrs2free, argv) pseudo_exec_argv(argv)
539#define pseudo_exec(ptrs2free, child) pseudo_exec(child) 539#define pseudo_exec(ptrs2free, child) pseudo_exec(child)
540#endif 540#endif
541static void pseudo_exec_argv(char **ptrs2free, char **argv) ATTRIBUTE_NORETURN; 541static void pseudo_exec_argv(char **ptrs2free, char **argv) NORETURN;
542static void pseudo_exec(char **ptrs2free, struct child_prog *child) ATTRIBUTE_NORETURN; 542static void pseudo_exec(char **ptrs2free, struct child_prog *child) NORETURN;
543static int run_pipe(struct pipe *pi); 543static int run_pipe(struct pipe *pi);
544/* data structure manipulation: */ 544/* data structure manipulation: */
545static int setup_redirect(struct p_context *ctx, int fd, redir_type style, struct in_str *input); 545static int setup_redirect(struct p_context *ctx, int fd, redir_type style, struct in_str *input);
@@ -805,14 +805,14 @@ static void set_every_sighandler(void (*handler)(int))
805 signal(SIGCHLD, handler); 805 signal(SIGCHLD, handler);
806} 806}
807 807
808static void handler_ctrl_c(int sig ATTRIBUTE_UNUSED) 808static void handler_ctrl_c(int sig UNUSED_PARAM)
809{ 809{
810 debug_printf_jobs("got sig %d\n", sig); 810 debug_printf_jobs("got sig %d\n", sig);
811// as usual we can have all kinds of nasty problems with leaked malloc data here 811// as usual we can have all kinds of nasty problems with leaked malloc data here
812 siglongjmp(toplevel_jb, 1); 812 siglongjmp(toplevel_jb, 1);
813} 813}
814 814
815static void handler_ctrl_z(int sig ATTRIBUTE_UNUSED) 815static void handler_ctrl_z(int sig UNUSED_PARAM)
816{ 816{
817 pid_t pid; 817 pid_t pid;
818 818
@@ -849,7 +849,7 @@ static void handler_ctrl_z(int sig ATTRIBUTE_UNUSED)
849 * (will faithfully resend signal to itself, producing correct exit state) 849 * (will faithfully resend signal to itself, producing correct exit state)
850 * or called directly with -EXITCODE. 850 * or called directly with -EXITCODE.
851 * We also call it if xfunc is exiting. */ 851 * We also call it if xfunc is exiting. */
852static void sigexit(int sig) ATTRIBUTE_NORETURN; 852static void sigexit(int sig) NORETURN;
853static void sigexit(int sig) 853static void sigexit(int sig)
854{ 854{
855 /* Disable all signals: job control, SIGPIPE, etc. */ 855 /* Disable all signals: job control, SIGPIPE, etc. */
@@ -866,7 +866,7 @@ static void sigexit(int sig)
866} 866}
867 867
868/* Restores tty foreground process group, and exits. */ 868/* Restores tty foreground process group, and exits. */
869static void hush_exit(int exitcode) ATTRIBUTE_NORETURN; 869static void hush_exit(int exitcode) NORETURN;
870static void hush_exit(int exitcode) 870static void hush_exit(int exitcode)
871{ 871{
872 fflush(NULL); /* flush all streams */ 872 fflush(NULL); /* flush all streams */
@@ -4004,7 +4004,7 @@ int lash_main(int argc, char **argv)
4004/* 4004/*
4005 * Built-ins 4005 * Built-ins
4006 */ 4006 */
4007static int builtin_true(char **argv ATTRIBUTE_UNUSED) 4007static int builtin_true(char **argv UNUSED_PARAM)
4008{ 4008{
4009 return 0; 4009 return 0;
4010} 4010}
@@ -4188,7 +4188,7 @@ static int builtin_fg_bg(char **argv)
4188#endif 4188#endif
4189 4189
4190#if ENABLE_HUSH_HELP 4190#if ENABLE_HUSH_HELP
4191static int builtin_help(char **argv ATTRIBUTE_UNUSED) 4191static int builtin_help(char **argv UNUSED_PARAM)
4192{ 4192{
4193 const struct built_in_command *x; 4193 const struct built_in_command *x;
4194 4194
@@ -4203,7 +4203,7 @@ static int builtin_help(char **argv ATTRIBUTE_UNUSED)
4203#endif 4203#endif
4204 4204
4205#if ENABLE_HUSH_JOB 4205#if ENABLE_HUSH_JOB
4206static int builtin_jobs(char **argv ATTRIBUTE_UNUSED) 4206static int builtin_jobs(char **argv UNUSED_PARAM)
4207{ 4207{
4208 struct pipe *job; 4208 struct pipe *job;
4209 const char *status_string; 4209 const char *status_string;
@@ -4220,7 +4220,7 @@ static int builtin_jobs(char **argv ATTRIBUTE_UNUSED)
4220} 4220}
4221#endif 4221#endif
4222 4222
4223static int builtin_pwd(char **argv ATTRIBUTE_UNUSED) 4223static int builtin_pwd(char **argv UNUSED_PARAM)
4224{ 4224{
4225 puts(set_cwd()); 4225 puts(set_cwd());
4226 return EXIT_SUCCESS; 4226 return EXIT_SUCCESS;