diff options
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/cat.c | 2 | ||||
-rw-r--r-- | coreutils/catv.c | 2 | ||||
-rw-r--r-- | coreutils/chmod.c | 2 | ||||
-rw-r--r-- | coreutils/chown.c | 4 | ||||
-rw-r--r-- | coreutils/comm.c | 2 | ||||
-rw-r--r-- | coreutils/cut.c | 2 | ||||
-rw-r--r-- | coreutils/du.c | 2 | ||||
-rw-r--r-- | coreutils/echo.c | 2 | ||||
-rw-r--r-- | coreutils/env.c | 2 | ||||
-rw-r--r-- | coreutils/expand.c | 2 | ||||
-rw-r--r-- | coreutils/id.c | 2 | ||||
-rw-r--r-- | coreutils/libcoreutils/coreutils.h | 2 | ||||
-rw-r--r-- | coreutils/libcoreutils/getopt_mk_fifo_nod.c | 2 | ||||
-rw-r--r-- | coreutils/mkfifo.c | 4 | ||||
-rw-r--r-- | coreutils/mknod.c | 2 | ||||
-rw-r--r-- | coreutils/pwd.c | 2 | ||||
-rw-r--r-- | coreutils/readlink.c | 2 | ||||
-rw-r--r-- | coreutils/rm.c | 2 | ||||
-rw-r--r-- | coreutils/rmdir.c | 2 | ||||
-rw-r--r-- | coreutils/sort.c | 2 | ||||
-rw-r--r-- | coreutils/split.c | 2 | ||||
-rw-r--r-- | coreutils/sync.c | 3 | ||||
-rw-r--r-- | coreutils/tac.c | 2 | ||||
-rw-r--r-- | coreutils/touch.c | 2 | ||||
-rw-r--r-- | coreutils/tr.c | 2 | ||||
-rw-r--r-- | coreutils/true.c | 2 | ||||
-rw-r--r-- | coreutils/tty.c | 8 | ||||
-rw-r--r-- | coreutils/uniq.c | 2 | ||||
-rw-r--r-- | coreutils/uudecode.c | 2 | ||||
-rw-r--r-- | coreutils/wc.c | 2 | ||||
-rw-r--r-- | coreutils/who.c | 2 | ||||
-rw-r--r-- | coreutils/whoami.c | 2 |
32 files changed, 39 insertions, 36 deletions
diff --git a/coreutils/cat.c b/coreutils/cat.c index 18a74b81d..181d96a2c 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c | |||
@@ -44,7 +44,7 @@ int bb_cat(char **argv) | |||
44 | } | 44 | } |
45 | 45 | ||
46 | int cat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 46 | int cat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
47 | int cat_main(int argc, char **argv) | 47 | int cat_main(int argc ATTRIBUTE_UNUSED, char **argv) |
48 | { | 48 | { |
49 | getopt32(argv, "u"); | 49 | getopt32(argv, "u"); |
50 | argv += optind; | 50 | argv += optind; |
diff --git a/coreutils/catv.c b/coreutils/catv.c index 5f5f1bf86..a5ee534e2 100644 --- a/coreutils/catv.c +++ b/coreutils/catv.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "libbb.h" | 13 | #include "libbb.h" |
14 | 14 | ||
15 | int catv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 15 | int catv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
16 | int catv_main(int argc, char **argv) | 16 | int catv_main(int argc ATTRIBUTE_UNUSED, char **argv) |
17 | { | 17 | { |
18 | int retval = EXIT_SUCCESS; | 18 | int retval = EXIT_SUCCESS; |
19 | int fd; | 19 | int fd; |
diff --git a/coreutils/chmod.c b/coreutils/chmod.c index a58e4f8e1..1bd0bd5c2 100644 --- a/coreutils/chmod.c +++ b/coreutils/chmod.c | |||
@@ -68,7 +68,7 @@ static int fileAction(const char *fileName, struct stat *statbuf, void* param, i | |||
68 | } | 68 | } |
69 | 69 | ||
70 | int chmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 70 | int chmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
71 | int chmod_main(int argc, char **argv) | 71 | int chmod_main(int argc ATTRIBUTE_UNUSED, char **argv) |
72 | { | 72 | { |
73 | int retval = EXIT_SUCCESS; | 73 | int retval = EXIT_SUCCESS; |
74 | char *arg, **argp; | 74 | char *arg, **argp; |
diff --git a/coreutils/chown.c b/coreutils/chown.c index df3b77dac..eaaefaf29 100644 --- a/coreutils/chown.c +++ b/coreutils/chown.c | |||
@@ -42,7 +42,7 @@ typedef int (*chown_fptr)(const char *, uid_t, gid_t); | |||
42 | static struct bb_uidgid_t ugid = { -1, -1 }; | 42 | static struct bb_uidgid_t ugid = { -1, -1 }; |
43 | 43 | ||
44 | static int fileAction(const char *fileName, struct stat *statbuf, | 44 | static int fileAction(const char *fileName, struct stat *statbuf, |
45 | void *cf, int depth) | 45 | void *cf, int depth ATTRIBUTE_UNUSED) |
46 | { | 46 | { |
47 | uid_t u = (ugid.uid == (uid_t)-1) ? statbuf->st_uid : ugid.uid; | 47 | uid_t u = (ugid.uid == (uid_t)-1) ? statbuf->st_uid : ugid.uid; |
48 | gid_t g = (ugid.gid == (gid_t)-1) ? statbuf->st_gid : ugid.gid; | 48 | gid_t g = (ugid.gid == (gid_t)-1) ? statbuf->st_gid : ugid.gid; |
@@ -62,7 +62,7 @@ static int fileAction(const char *fileName, struct stat *statbuf, | |||
62 | } | 62 | } |
63 | 63 | ||
64 | int chown_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 64 | int chown_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
65 | int chown_main(int argc, char **argv) | 65 | int chown_main(int argc ATTRIBUTE_UNUSED, char **argv) |
66 | { | 66 | { |
67 | int retval = EXIT_SUCCESS; | 67 | int retval = EXIT_SUCCESS; |
68 | int flags; | 68 | int flags; |
diff --git a/coreutils/comm.c b/coreutils/comm.c index 67088e06c..4dbc0d477 100644 --- a/coreutils/comm.c +++ b/coreutils/comm.c | |||
@@ -36,7 +36,7 @@ static void writeline(char *line, int class, int flags) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | int comm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 38 | int comm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
39 | int comm_main(int argc, char **argv) | 39 | int comm_main(int argc ATTRIBUTE_UNUSED, char **argv) |
40 | { | 40 | { |
41 | #define LINE_LEN 100 | 41 | #define LINE_LEN 100 |
42 | #define BB_EOF_0 0x1 | 42 | #define BB_EOF_0 0x1 |
diff --git a/coreutils/cut.c b/coreutils/cut.c index 4f0bed3e7..ed6f8f608 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c | |||
@@ -162,7 +162,7 @@ static void cut_file(FILE *file, char delim) | |||
162 | } | 162 | } |
163 | 163 | ||
164 | int cut_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 164 | int cut_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
165 | int cut_main(int argc, char **argv) | 165 | int cut_main(int argc ATTRIBUTE_UNUSED, char **argv) |
166 | { | 166 | { |
167 | char delim = '\t'; /* delimiter, default is tab */ | 167 | char delim = '\t'; /* delimiter, default is tab */ |
168 | char *sopt, *ltok; | 168 | char *sopt, *ltok; |
diff --git a/coreutils/du.c b/coreutils/du.c index 3941151e1..7495f7a7b 100644 --- a/coreutils/du.c +++ b/coreutils/du.c | |||
@@ -141,7 +141,7 @@ static unsigned long du(const char *filename) | |||
141 | } | 141 | } |
142 | 142 | ||
143 | int du_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 143 | int du_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
144 | int du_main(int argc, char **argv) | 144 | int du_main(int argc ATTRIBUTE_UNUSED, char **argv) |
145 | { | 145 | { |
146 | unsigned long total; | 146 | unsigned long total; |
147 | int slink_depth_save; | 147 | int slink_depth_save; |
diff --git a/coreutils/echo.c b/coreutils/echo.c index 771f610b0..fd6c950ea 100644 --- a/coreutils/echo.c +++ b/coreutils/echo.c | |||
@@ -31,7 +31,7 @@ | |||
31 | * using call -> jump optimization */ | 31 | * using call -> jump optimization */ |
32 | 32 | ||
33 | int echo_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 33 | int echo_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
34 | int echo_main(int argc, char **argv) | 34 | int echo_main(int argc ATTRIBUTE_UNUSED, char **argv) |
35 | { | 35 | { |
36 | const char *arg; | 36 | const char *arg; |
37 | #if !ENABLE_FEATURE_FANCY_ECHO | 37 | #if !ENABLE_FEATURE_FANCY_ECHO |
diff --git a/coreutils/env.c b/coreutils/env.c index 7273d39fc..f678565eb 100644 --- a/coreutils/env.c +++ b/coreutils/env.c | |||
@@ -40,7 +40,7 @@ static const char env_longopts[] ALIGN1 = | |||
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | int env_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 42 | int env_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
43 | int env_main(int argc, char **argv) | 43 | int env_main(int argc ATTRIBUTE_UNUSED, char **argv) |
44 | { | 44 | { |
45 | /* cleanenv was static - why? */ | 45 | /* cleanenv was static - why? */ |
46 | char *cleanenv[1]; | 46 | char *cleanenv[1]; |
diff --git a/coreutils/expand.c b/coreutils/expand.c index 96a74a336..c0133956f 100644 --- a/coreutils/expand.c +++ b/coreutils/expand.c | |||
@@ -126,7 +126,7 @@ static void unexpand(FILE *file, unsigned int tab_size, unsigned opt) | |||
126 | #endif | 126 | #endif |
127 | 127 | ||
128 | int expand_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 128 | int expand_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
129 | int expand_main(int argc, char **argv) | 129 | int expand_main(int argc ATTRIBUTE_UNUSED, char **argv) |
130 | { | 130 | { |
131 | /* Default 8 spaces for 1 tab */ | 131 | /* Default 8 spaces for 1 tab */ |
132 | const char *opt_t = "8"; | 132 | const char *opt_t = "8"; |
diff --git a/coreutils/id.c b/coreutils/id.c index 7dba80284..9afb10088 100644 --- a/coreutils/id.c +++ b/coreutils/id.c | |||
@@ -37,7 +37,7 @@ static int printf_full(unsigned int id, const char *arg, const char prefix) | |||
37 | } | 37 | } |
38 | 38 | ||
39 | int id_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 39 | int id_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
40 | int id_main(int argc, char **argv) | 40 | int id_main(int argc ATTRIBUTE_UNUSED, char **argv) |
41 | { | 41 | { |
42 | struct passwd *p; | 42 | struct passwd *p; |
43 | uid_t uid; | 43 | uid_t uid; |
diff --git a/coreutils/libcoreutils/coreutils.h b/coreutils/libcoreutils/coreutils.h index 687c7cc5c..c1796b381 100644 --- a/coreutils/libcoreutils/coreutils.h +++ b/coreutils/libcoreutils/coreutils.h | |||
@@ -11,6 +11,6 @@ typedef int (*stat_func)(const char *fn, struct stat *ps); | |||
11 | int cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf); | 11 | int cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf); |
12 | int cp_mv_stat(const char *fn, struct stat *fn_stat); | 12 | int cp_mv_stat(const char *fn, struct stat *fn_stat); |
13 | 13 | ||
14 | mode_t getopt_mk_fifo_nod(int argc, char **argv); | 14 | mode_t getopt_mk_fifo_nod(char **argv); |
15 | 15 | ||
16 | #endif | 16 | #endif |
diff --git a/coreutils/libcoreutils/getopt_mk_fifo_nod.c b/coreutils/libcoreutils/getopt_mk_fifo_nod.c index 377621568..32e55a56b 100644 --- a/coreutils/libcoreutils/getopt_mk_fifo_nod.c +++ b/coreutils/libcoreutils/getopt_mk_fifo_nod.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include "libbb.h" | 23 | #include "libbb.h" |
24 | #include "coreutils.h" | 24 | #include "coreutils.h" |
25 | 25 | ||
26 | mode_t getopt_mk_fifo_nod(int argc, char **argv) | 26 | mode_t getopt_mk_fifo_nod(char **argv) |
27 | { | 27 | { |
28 | mode_t mode = 0666; | 28 | mode_t mode = 0666; |
29 | char *smode = NULL; | 29 | char *smode = NULL; |
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c index d298adae0..d9261b96a 100644 --- a/coreutils/mkfifo.c +++ b/coreutils/mkfifo.c | |||
@@ -14,12 +14,12 @@ | |||
14 | #include "libcoreutils/coreutils.h" | 14 | #include "libcoreutils/coreutils.h" |
15 | 15 | ||
16 | int mkfifo_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 16 | int mkfifo_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
17 | int mkfifo_main(int argc, char **argv) | 17 | int mkfifo_main(int argc ATTRIBUTE_UNUSED, char **argv) |
18 | { | 18 | { |
19 | mode_t mode; | 19 | mode_t mode; |
20 | int retval = EXIT_SUCCESS; | 20 | int retval = EXIT_SUCCESS; |
21 | 21 | ||
22 | mode = getopt_mk_fifo_nod(argc, argv); | 22 | mode = getopt_mk_fifo_nod(argv); |
23 | 23 | ||
24 | argv += optind; | 24 | argv += optind; |
25 | if (!*argv) { | 25 | if (!*argv) { |
diff --git a/coreutils/mknod.c b/coreutils/mknod.c index 55f531033..0c694948e 100644 --- a/coreutils/mknod.c +++ b/coreutils/mknod.c | |||
@@ -24,7 +24,7 @@ int mknod_main(int argc, char **argv) | |||
24 | dev_t dev; | 24 | dev_t dev; |
25 | const char *name; | 25 | const char *name; |
26 | 26 | ||
27 | mode = getopt_mk_fifo_nod(argc, argv); | 27 | mode = getopt_mk_fifo_nod(argv); |
28 | argv += optind; | 28 | argv += optind; |
29 | argc -= optind; | 29 | argc -= optind; |
30 | 30 | ||
diff --git a/coreutils/pwd.c b/coreutils/pwd.c index ac604db97..9279dbee6 100644 --- a/coreutils/pwd.c +++ b/coreutils/pwd.c | |||
@@ -12,7 +12,7 @@ | |||
12 | /* This is a NOFORK applet. Be very careful! */ | 12 | /* This is a NOFORK applet. Be very careful! */ |
13 | 13 | ||
14 | int pwd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 14 | int pwd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
15 | int pwd_main(int argc, char **argv) | 15 | int pwd_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) |
16 | { | 16 | { |
17 | char *buf; | 17 | char *buf; |
18 | 18 | ||
diff --git a/coreutils/readlink.c b/coreutils/readlink.c index 1ab94595a..3f13a3660 100644 --- a/coreutils/readlink.c +++ b/coreutils/readlink.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include "libbb.h" | 11 | #include "libbb.h" |
12 | 12 | ||
13 | int readlink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 13 | int readlink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
14 | int readlink_main(int argc, char **argv) | 14 | int readlink_main(int argc ATTRIBUTE_UNUSED, char **argv) |
15 | { | 15 | { |
16 | char *buf; | 16 | char *buf; |
17 | char *fname; | 17 | char *fname; |
diff --git a/coreutils/rm.c b/coreutils/rm.c index a123156d2..1774ce296 100644 --- a/coreutils/rm.c +++ b/coreutils/rm.c | |||
@@ -20,7 +20,7 @@ | |||
20 | /* This is a NOFORK applet. Be very careful! */ | 20 | /* This is a NOFORK applet. Be very careful! */ |
21 | 21 | ||
22 | int rm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 22 | int rm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
23 | int rm_main(int argc, char **argv) | 23 | int rm_main(int argc ATTRIBUTE_UNUSED, char **argv) |
24 | { | 24 | { |
25 | int status = 0; | 25 | int status = 0; |
26 | int flags = 0; | 26 | int flags = 0; |
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c index 96bee231b..cb6046617 100644 --- a/coreutils/rmdir.c +++ b/coreutils/rmdir.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #define IGNORE_NON_EMPTY 0x02 | 19 | #define IGNORE_NON_EMPTY 0x02 |
20 | 20 | ||
21 | int rmdir_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 21 | int rmdir_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
22 | int rmdir_main(int argc, char **argv) | 22 | int rmdir_main(int argc ATTRIBUTE_UNUSED, char **argv) |
23 | { | 23 | { |
24 | int status = EXIT_SUCCESS; | 24 | int status = EXIT_SUCCESS; |
25 | int flags; | 25 | int flags; |
diff --git a/coreutils/sort.c b/coreutils/sort.c index d8df4c532..510f7a235 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c | |||
@@ -275,7 +275,7 @@ static unsigned str2u(char **str) | |||
275 | #endif | 275 | #endif |
276 | 276 | ||
277 | int sort_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 277 | int sort_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
278 | int sort_main(int argc, char **argv) | 278 | int sort_main(int argc ATTRIBUTE_UNUSED, char **argv) |
279 | { | 279 | { |
280 | FILE *fp, *outfile = stdout; | 280 | FILE *fp, *outfile = stdout; |
281 | char *line, **lines = NULL; | 281 | char *line, **lines = NULL; |
diff --git a/coreutils/split.c b/coreutils/split.c index 895a04b06..cf26a9322 100644 --- a/coreutils/split.c +++ b/coreutils/split.c | |||
@@ -56,7 +56,7 @@ enum { READ_BUFFER_SIZE = COMMON_BUFSIZE - 1 }; | |||
56 | #define SPLIT_OPT_a (1<<2) | 56 | #define SPLIT_OPT_a (1<<2) |
57 | 57 | ||
58 | int split_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 58 | int split_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
59 | int split_main(int argc, char **argv) | 59 | int split_main(int argc ATTRIBUTE_UNUSED, char **argv) |
60 | { | 60 | { |
61 | unsigned suffix_len = 2; | 61 | unsigned suffix_len = 2; |
62 | char *pfx; | 62 | char *pfx; |
diff --git a/coreutils/sync.c b/coreutils/sync.c index 9dbdd98aa..5c9d0926f 100644 --- a/coreutils/sync.c +++ b/coreutils/sync.c | |||
@@ -14,8 +14,9 @@ | |||
14 | /* This is a NOFORK applet. Be very careful! */ | 14 | /* This is a NOFORK applet. Be very careful! */ |
15 | 15 | ||
16 | int sync_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 16 | int sync_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
17 | int sync_main(int argc, char **argv) | 17 | int sync_main(int argc, char **argv ATTRIBUTE_UNUSED) |
18 | { | 18 | { |
19 | /* coreutils-6.9 compat */ | ||
19 | bb_warn_ignoring_args(argc - 1); | 20 | bb_warn_ignoring_args(argc - 1); |
20 | 21 | ||
21 | sync(); | 22 | sync(); |
diff --git a/coreutils/tac.c b/coreutils/tac.c index 7951be255..ddadcc7bc 100644 --- a/coreutils/tac.c +++ b/coreutils/tac.c | |||
@@ -26,7 +26,7 @@ struct lstring { | |||
26 | }; | 26 | }; |
27 | 27 | ||
28 | int tac_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 28 | int tac_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
29 | int tac_main(int argc, char **argv) | 29 | int tac_main(int argc ATTRIBUTE_UNUSED, char **argv) |
30 | { | 30 | { |
31 | char **name; | 31 | char **name; |
32 | FILE *f; | 32 | FILE *f; |
diff --git a/coreutils/touch.c b/coreutils/touch.c index 3fe8b64ad..0b58179e7 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c | |||
@@ -22,7 +22,7 @@ | |||
22 | /* This is a NOFORK applet. Be very careful! */ | 22 | /* This is a NOFORK applet. Be very careful! */ |
23 | 23 | ||
24 | int touch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 24 | int touch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
25 | int touch_main(int argc, char **argv) | 25 | int touch_main(int argc ATTRIBUTE_UNUSED, char **argv) |
26 | { | 26 | { |
27 | int fd; | 27 | int fd; |
28 | int status = EXIT_SUCCESS; | 28 | int status = EXIT_SUCCESS; |
diff --git a/coreutils/tr.c b/coreutils/tr.c index a28ab465e..d0af63a36 100644 --- a/coreutils/tr.c +++ b/coreutils/tr.c | |||
@@ -174,7 +174,7 @@ static int complement(char *buffer, int buffer_len) | |||
174 | } | 174 | } |
175 | 175 | ||
176 | int tr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 176 | int tr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
177 | int tr_main(int argc, char **argv) | 177 | int tr_main(int argc ATTRIBUTE_UNUSED, char **argv) |
178 | { | 178 | { |
179 | int output_length = 0, input_length; | 179 | int output_length = 0, input_length; |
180 | int i; | 180 | int i; |
diff --git a/coreutils/true.c b/coreutils/true.c index 2b5919320..565e68b83 100644 --- a/coreutils/true.c +++ b/coreutils/true.c | |||
@@ -15,7 +15,7 @@ | |||
15 | /* This is a NOFORK applet. Be very careful! */ | 15 | /* This is a NOFORK applet. Be very careful! */ |
16 | 16 | ||
17 | int true_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 17 | int true_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
18 | int true_main(int argc, char **argv) | 18 | int true_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) |
19 | { | 19 | { |
20 | return EXIT_SUCCESS; | 20 | return EXIT_SUCCESS; |
21 | } | 21 | } |
diff --git a/coreutils/tty.c b/coreutils/tty.c index b0a50ff61..48e15117c 100644 --- a/coreutils/tty.c +++ b/coreutils/tty.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "libbb.h" | 13 | #include "libbb.h" |
14 | 14 | ||
15 | int tty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 15 | int tty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
16 | int tty_main(int argc, char **argv) | 16 | int tty_main(int argc, char **argv SKIP_INCLUDE_SUSv2(ATTRIBUTE_UNUSED)) |
17 | { | 17 | { |
18 | const char *s; | 18 | const char *s; |
19 | USE_INCLUDE_SUSv2(int silent;) /* Note: No longer relevant in SUSv3. */ | 19 | USE_INCLUDE_SUSv2(int silent;) /* Note: No longer relevant in SUSv3. */ |
@@ -22,15 +22,17 @@ int tty_main(int argc, char **argv) | |||
22 | xfunc_error_retval = 2; /* SUSv3 requires > 1 for error. */ | 22 | xfunc_error_retval = 2; /* SUSv3 requires > 1 for error. */ |
23 | 23 | ||
24 | USE_INCLUDE_SUSv2(silent = getopt32(argv, "s");) | 24 | USE_INCLUDE_SUSv2(silent = getopt32(argv, "s");) |
25 | USE_INCLUDE_SUSv2(argc -= optind;) | ||
26 | SKIP_INCLUDE_SUSv2(argc -= 1;) | ||
25 | 27 | ||
26 | /* gnu tty outputs a warning that it is ignoring all args. */ | 28 | /* gnu tty outputs a warning that it is ignoring all args. */ |
27 | bb_warn_ignoring_args(argc - optind); | 29 | bb_warn_ignoring_args(argc); |
28 | 30 | ||
29 | retval = 0; | 31 | retval = 0; |
30 | 32 | ||
31 | s = ttyname(0); | 33 | s = ttyname(0); |
32 | if (s == NULL) { | 34 | if (s == NULL) { |
33 | /* According to SUSv3, ttyname can on fail with EBADF or ENOTTY. | 35 | /* According to SUSv3, ttyname can fail with EBADF or ENOTTY. |
34 | * We know the file descriptor is good, so failure means not a tty. */ | 36 | * We know the file descriptor is good, so failure means not a tty. */ |
35 | s = "not a tty"; | 37 | s = "not a tty"; |
36 | retval = 1; | 38 | retval = 1; |
diff --git a/coreutils/uniq.c b/coreutils/uniq.c index cda1e61a9..d0729607c 100644 --- a/coreutils/uniq.c +++ b/coreutils/uniq.c | |||
@@ -28,7 +28,7 @@ static FILE *xgetoptfile_uniq_s(char **argv, int read0write2) | |||
28 | } | 28 | } |
29 | 29 | ||
30 | int uniq_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 30 | int uniq_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
31 | int uniq_main(int argc, char **argv) | 31 | int uniq_main(int argc ATTRIBUTE_UNUSED, char **argv) |
32 | { | 32 | { |
33 | FILE *in, *out; | 33 | FILE *in, *out; |
34 | unsigned long dups, skip_fields, skip_chars, i; | 34 | unsigned long dups, skip_fields, skip_chars, i; |
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c index 46836624c..34a22398c 100644 --- a/coreutils/uudecode.c +++ b/coreutils/uudecode.c | |||
@@ -127,7 +127,7 @@ static void read_base64(FILE *src_stream, FILE *dst_stream) | |||
127 | } | 127 | } |
128 | 128 | ||
129 | int uudecode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 129 | int uudecode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
130 | int uudecode_main(int argc, char **argv) | 130 | int uudecode_main(int argc ATTRIBUTE_UNUSED, char **argv) |
131 | { | 131 | { |
132 | FILE *src_stream = stdin; | 132 | FILE *src_stream = stdin; |
133 | char *outname = NULL; | 133 | char *outname = NULL; |
diff --git a/coreutils/wc.c b/coreutils/wc.c index 58ea1c7db..de3c895bd 100644 --- a/coreutils/wc.c +++ b/coreutils/wc.c | |||
@@ -69,7 +69,7 @@ enum { | |||
69 | }; | 69 | }; |
70 | 70 | ||
71 | int wc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 71 | int wc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
72 | int wc_main(int argc, char **argv) | 72 | int wc_main(int argc ATTRIBUTE_UNUSED, char **argv) |
73 | { | 73 | { |
74 | FILE *fp; | 74 | FILE *fp; |
75 | const char *s, *arg; | 75 | const char *s, *arg; |
diff --git a/coreutils/who.c b/coreutils/who.c index e6bd0afa8..a206ec54b 100644 --- a/coreutils/who.c +++ b/coreutils/who.c | |||
@@ -41,7 +41,7 @@ static void idle_string(char *str6, time_t t) | |||
41 | } | 41 | } |
42 | 42 | ||
43 | int who_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 43 | int who_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
44 | int who_main(int argc, char **argv) | 44 | int who_main(int argc ATTRIBUTE_UNUSED, char **argv) |
45 | { | 45 | { |
46 | char str6[6]; | 46 | char str6[6]; |
47 | struct utmp *ut; | 47 | struct utmp *ut; |
diff --git a/coreutils/whoami.c b/coreutils/whoami.c index e2fdfc955..d35572ece 100644 --- a/coreutils/whoami.c +++ b/coreutils/whoami.c | |||
@@ -14,7 +14,7 @@ | |||
14 | /* This is a NOFORK applet. Be very careful! */ | 14 | /* This is a NOFORK applet. Be very careful! */ |
15 | 15 | ||
16 | int whoami_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 16 | int whoami_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
17 | int whoami_main(int argc, char **argv) | 17 | int whoami_main(int argc, char **argv ATTRIBUTE_UNUSED) |
18 | { | 18 | { |
19 | if (argc > 1) | 19 | if (argc > 1) |
20 | bb_show_usage(); | 20 | bb_show_usage(); |