diff options
Diffstat (limited to 'shell/msh.c')
-rw-r--r-- | shell/msh.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/shell/msh.c b/shell/msh.c index 2b6b3853f..44213c657 100644 --- a/shell/msh.c +++ b/shell/msh.c | |||
@@ -45,7 +45,7 @@ | |||
45 | # define nonblock_safe_read(fd,buf,count) read(fd,buf,count) | 45 | # define nonblock_safe_read(fd,buf,count) read(fd,buf,count) |
46 | # define NOT_LONE_DASH(s) ((s)[0] != '-' || (s)[1]) | 46 | # define NOT_LONE_DASH(s) ((s)[0] != '-' || (s)[1]) |
47 | # define LONE_CHAR(s,c) ((s)[0] == (c) && !(s)[1]) | 47 | # define LONE_CHAR(s,c) ((s)[0] == (c) && !(s)[1]) |
48 | # define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) | 48 | # define NORETURN __attribute__ ((__noreturn__)) |
49 | static int find_applet_by_name(const char *applet) | 49 | static int find_applet_by_name(const char *applet) |
50 | { | 50 | { |
51 | return -1; | 51 | return -1; |
@@ -780,7 +780,7 @@ static void closeall(void) | |||
780 | 780 | ||
781 | 781 | ||
782 | /* fail but return to process next command */ | 782 | /* fail but return to process next command */ |
783 | static void fail(void) ATTRIBUTE_NORETURN; | 783 | static void fail(void) NORETURN; |
784 | static void fail(void) | 784 | static void fail(void) |
785 | { | 785 | { |
786 | longjmp(failpt, 1); | 786 | longjmp(failpt, 1); |
@@ -788,7 +788,7 @@ static void fail(void) | |||
788 | } | 788 | } |
789 | 789 | ||
790 | /* abort shell (or fail in subshell) */ | 790 | /* abort shell (or fail in subshell) */ |
791 | static void leave(void) ATTRIBUTE_NORETURN; | 791 | static void leave(void) NORETURN; |
792 | static void leave(void) | 792 | static void leave(void) |
793 | { | 793 | { |
794 | DBGPRINTF(("LEAVE: leave called!\n")); | 794 | DBGPRINTF(("LEAVE: leave called!\n")); |
@@ -1450,7 +1450,7 @@ static void next(int f) | |||
1450 | PUSHIO(afile, f, filechar); | 1450 | PUSHIO(afile, f, filechar); |
1451 | } | 1451 | } |
1452 | 1452 | ||
1453 | static void onintr(int s ATTRIBUTE_UNUSED) /* ANSI C requires a parameter */ | 1453 | static void onintr(int s UNUSED_PARAM) /* ANSI C requires a parameter */ |
1454 | { | 1454 | { |
1455 | signal(SIGINT, onintr); | 1455 | signal(SIGINT, onintr); |
1456 | intr = 1; | 1456 | intr = 1; |
@@ -1545,7 +1545,7 @@ static int gmatch(const char *s, const char *p) | |||
1545 | * shell: syntax (C version) | 1545 | * shell: syntax (C version) |
1546 | */ | 1546 | */ |
1547 | 1547 | ||
1548 | static void yyerror(const char *s) ATTRIBUTE_NORETURN; | 1548 | static void yyerror(const char *s) NORETURN; |
1549 | static void yyerror(const char *s) | 1549 | static void yyerror(const char *s) |
1550 | { | 1550 | { |
1551 | yynerrs = 1; | 1551 | yynerrs = 1; |
@@ -1558,7 +1558,7 @@ static void yyerror(const char *s) | |||
1558 | fail(); | 1558 | fail(); |
1559 | } | 1559 | } |
1560 | 1560 | ||
1561 | static void zzerr(void) ATTRIBUTE_NORETURN; | 1561 | static void zzerr(void) NORETURN; |
1562 | static void zzerr(void) | 1562 | static void zzerr(void) |
1563 | { | 1563 | { |
1564 | yyerror("syntax error"); | 1564 | yyerror("syntax error"); |
@@ -3163,7 +3163,7 @@ static int run(struct ioarg *argp, int (*f) (struct ioarg *)) | |||
3163 | * built-in commands: doX | 3163 | * built-in commands: doX |
3164 | */ | 3164 | */ |
3165 | 3165 | ||
3166 | static int dohelp(struct op *t ATTRIBUTE_UNUSED, char **args ATTRIBUTE_UNUSED) | 3166 | static int dohelp(struct op *t UNUSED_PARAM, char **args UNUSED_PARAM) |
3167 | { | 3167 | { |
3168 | int col; | 3168 | int col; |
3169 | const struct builtincmd *x; | 3169 | const struct builtincmd *x; |
@@ -3199,12 +3199,12 @@ static int dohelp(struct op *t ATTRIBUTE_UNUSED, char **args ATTRIBUTE_UNUSED) | |||
3199 | return EXIT_SUCCESS; | 3199 | return EXIT_SUCCESS; |
3200 | } | 3200 | } |
3201 | 3201 | ||
3202 | static int dolabel(struct op *t ATTRIBUTE_UNUSED, char **args ATTRIBUTE_UNUSED) | 3202 | static int dolabel(struct op *t UNUSED_PARAM, char **args UNUSED_PARAM) |
3203 | { | 3203 | { |
3204 | return 0; | 3204 | return 0; |
3205 | } | 3205 | } |
3206 | 3206 | ||
3207 | static int dochdir(struct op *t ATTRIBUTE_UNUSED, char **args) | 3207 | static int dochdir(struct op *t UNUSED_PARAM, char **args) |
3208 | { | 3208 | { |
3209 | const char *cp, *er; | 3209 | const char *cp, *er; |
3210 | 3210 | ||
@@ -3225,7 +3225,7 @@ static int dochdir(struct op *t ATTRIBUTE_UNUSED, char **args) | |||
3225 | return 1; | 3225 | return 1; |
3226 | } | 3226 | } |
3227 | 3227 | ||
3228 | static int doshift(struct op *t ATTRIBUTE_UNUSED, char **args) | 3228 | static int doshift(struct op *t UNUSED_PARAM, char **args) |
3229 | { | 3229 | { |
3230 | int n; | 3230 | int n; |
3231 | 3231 | ||
@@ -3244,7 +3244,7 @@ static int doshift(struct op *t ATTRIBUTE_UNUSED, char **args) | |||
3244 | /* | 3244 | /* |
3245 | * execute login and newgrp directly | 3245 | * execute login and newgrp directly |
3246 | */ | 3246 | */ |
3247 | static int dologin(struct op *t ATTRIBUTE_UNUSED, char **args) | 3247 | static int dologin(struct op *t UNUSED_PARAM, char **args) |
3248 | { | 3248 | { |
3249 | const char *cp; | 3249 | const char *cp; |
3250 | 3250 | ||
@@ -3259,7 +3259,7 @@ static int dologin(struct op *t ATTRIBUTE_UNUSED, char **args) | |||
3259 | return 1; | 3259 | return 1; |
3260 | } | 3260 | } |
3261 | 3261 | ||
3262 | static int doumask(struct op *t ATTRIBUTE_UNUSED, char **args) | 3262 | static int doumask(struct op *t UNUSED_PARAM, char **args) |
3263 | { | 3263 | { |
3264 | int i; | 3264 | int i; |
3265 | char *cp; | 3265 | char *cp; |
@@ -3309,7 +3309,7 @@ static int doexec(struct op *t, char **args) | |||
3309 | return 1; | 3309 | return 1; |
3310 | } | 3310 | } |
3311 | 3311 | ||
3312 | static int dodot(struct op *t ATTRIBUTE_UNUSED, char **args) | 3312 | static int dodot(struct op *t UNUSED_PARAM, char **args) |
3313 | { | 3313 | { |
3314 | int i; | 3314 | int i; |
3315 | const char *sp; | 3315 | const char *sp; |
@@ -3363,7 +3363,7 @@ static int dodot(struct op *t ATTRIBUTE_UNUSED, char **args) | |||
3363 | return -1; | 3363 | return -1; |
3364 | } | 3364 | } |
3365 | 3365 | ||
3366 | static int dowait(struct op *t ATTRIBUTE_UNUSED, char **args) | 3366 | static int dowait(struct op *t UNUSED_PARAM, char **args) |
3367 | { | 3367 | { |
3368 | int i; | 3368 | int i; |
3369 | char *cp; | 3369 | char *cp; |
@@ -3379,7 +3379,7 @@ static int dowait(struct op *t ATTRIBUTE_UNUSED, char **args) | |||
3379 | return 0; | 3379 | return 0; |
3380 | } | 3380 | } |
3381 | 3381 | ||
3382 | static int doread(struct op *t ATTRIBUTE_UNUSED, char **args) | 3382 | static int doread(struct op *t UNUSED_PARAM, char **args) |
3383 | { | 3383 | { |
3384 | char *cp, **wp; | 3384 | char *cp, **wp; |
3385 | int nb = 0; | 3385 | int nb = 0; |
@@ -3406,12 +3406,12 @@ static int doread(struct op *t ATTRIBUTE_UNUSED, char **args) | |||
3406 | return nb <= 0; | 3406 | return nb <= 0; |
3407 | } | 3407 | } |
3408 | 3408 | ||
3409 | static int doeval(struct op *t ATTRIBUTE_UNUSED, char **args) | 3409 | static int doeval(struct op *t UNUSED_PARAM, char **args) |
3410 | { | 3410 | { |
3411 | return RUN(awordlist, args + 1, wdchar); | 3411 | return RUN(awordlist, args + 1, wdchar); |
3412 | } | 3412 | } |
3413 | 3413 | ||
3414 | static int dotrap(struct op *t ATTRIBUTE_UNUSED, char **args) | 3414 | static int dotrap(struct op *t UNUSED_PARAM, char **args) |
3415 | { | 3415 | { |
3416 | int n, i; | 3416 | int n, i; |
3417 | int resetsig; | 3417 | int resetsig; |
@@ -3492,12 +3492,12 @@ static int getn(char *as) | |||
3492 | return n * m; | 3492 | return n * m; |
3493 | } | 3493 | } |
3494 | 3494 | ||
3495 | static int dobreak(struct op *t ATTRIBUTE_UNUSED, char **args) | 3495 | static int dobreak(struct op *t UNUSED_PARAM, char **args) |
3496 | { | 3496 | { |
3497 | return brkcontin(args[1], 1); | 3497 | return brkcontin(args[1], 1); |
3498 | } | 3498 | } |
3499 | 3499 | ||
3500 | static int docontinue(struct op *t ATTRIBUTE_UNUSED, char **args) | 3500 | static int docontinue(struct op *t UNUSED_PARAM, char **args) |
3501 | { | 3501 | { |
3502 | return brkcontin(args[1], 0); | 3502 | return brkcontin(args[1], 0); |
3503 | } | 3503 | } |
@@ -3525,7 +3525,7 @@ static int brkcontin(char *cp, int val) | |||
3525 | /* NOTREACHED */ | 3525 | /* NOTREACHED */ |
3526 | } | 3526 | } |
3527 | 3527 | ||
3528 | static int doexit(struct op *t ATTRIBUTE_UNUSED, char **args) | 3528 | static int doexit(struct op *t UNUSED_PARAM, char **args) |
3529 | { | 3529 | { |
3530 | char *cp; | 3530 | char *cp; |
3531 | 3531 | ||
@@ -3541,13 +3541,13 @@ static int doexit(struct op *t ATTRIBUTE_UNUSED, char **args) | |||
3541 | return 0; | 3541 | return 0; |
3542 | } | 3542 | } |
3543 | 3543 | ||
3544 | static int doexport(struct op *t ATTRIBUTE_UNUSED, char **args) | 3544 | static int doexport(struct op *t UNUSED_PARAM, char **args) |
3545 | { | 3545 | { |
3546 | rdexp(args + 1, export, EXPORT); | 3546 | rdexp(args + 1, export, EXPORT); |
3547 | return 0; | 3547 | return 0; |
3548 | } | 3548 | } |
3549 | 3549 | ||
3550 | static int doreadonly(struct op *t ATTRIBUTE_UNUSED, char **args) | 3550 | static int doreadonly(struct op *t UNUSED_PARAM, char **args) |
3551 | { | 3551 | { |
3552 | rdexp(args + 1, ronly, RONLY); | 3552 | rdexp(args + 1, ronly, RONLY); |
3553 | return 0; | 3553 | return 0; |
@@ -3583,7 +3583,7 @@ static void badid(char *s) | |||
3583 | err(": bad identifier"); | 3583 | err(": bad identifier"); |
3584 | } | 3584 | } |
3585 | 3585 | ||
3586 | static int doset(struct op *t ATTRIBUTE_UNUSED, char **args) | 3586 | static int doset(struct op *t UNUSED_PARAM, char **args) |
3587 | { | 3587 | { |
3588 | struct var *vp; | 3588 | struct var *vp; |
3589 | char *cp; | 3589 | char *cp; |
@@ -3658,7 +3658,7 @@ static void times_fmt(char *buf, clock_t val, unsigned clk_tck) | |||
3658 | #endif | 3658 | #endif |
3659 | } | 3659 | } |
3660 | 3660 | ||
3661 | static int dotimes(struct op *t ATTRIBUTE_UNUSED, char **args ATTRIBUTE_UNUSED) | 3661 | static int dotimes(struct op *t UNUSED_PARAM, char **args UNUSED_PARAM) |
3662 | { | 3662 | { |
3663 | struct tms buf; | 3663 | struct tms buf; |
3664 | unsigned clk_tck = sysconf(_SC_CLK_TCK); | 3664 | unsigned clk_tck = sysconf(_SC_CLK_TCK); |