diff options
228 files changed, 479 insertions, 479 deletions
diff --git a/applets/applets.c b/applets/applets.c index fbe766623..133a21575 100644 --- a/applets/applets.c +++ b/applets/applets.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include "busybox.h" | 11 | #include "busybox.h" |
12 | 12 | ||
13 | #if ENABLE_BUILD_LIBBUSYBOX | 13 | #if ENABLE_BUILD_LIBBUSYBOX |
14 | int main(int argc ATTRIBUTE_UNUSED, char **argv) | 14 | int main(int argc UNUSED_PARAM, char **argv) |
15 | { | 15 | { |
16 | return lbb_main(argv); | 16 | return lbb_main(argv); |
17 | } | 17 | } |
diff --git a/archival/bbunzip.c b/archival/bbunzip.c index b2e816145..65bb8b7f4 100644 --- a/archival/bbunzip.c +++ b/archival/bbunzip.c | |||
@@ -165,7 +165,7 @@ USE_DESKTOP(long long) int unpack_bunzip2(void) | |||
165 | } | 165 | } |
166 | 166 | ||
167 | int bunzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 167 | int bunzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
168 | int bunzip2_main(int argc ATTRIBUTE_UNUSED, char **argv) | 168 | int bunzip2_main(int argc UNUSED_PARAM, char **argv) |
169 | { | 169 | { |
170 | getopt32(argv, "cfvdt"); | 170 | getopt32(argv, "cfvdt"); |
171 | argv += optind; | 171 | argv += optind; |
@@ -277,7 +277,7 @@ USE_DESKTOP(long long) int unpack_gunzip(void) | |||
277 | */ | 277 | */ |
278 | 278 | ||
279 | int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 279 | int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
280 | int gunzip_main(int argc ATTRIBUTE_UNUSED, char **argv) | 280 | int gunzip_main(int argc UNUSED_PARAM, char **argv) |
281 | { | 281 | { |
282 | getopt32(argv, "cfvdtn"); | 282 | getopt32(argv, "cfvdtn"); |
283 | argv += optind; | 283 | argv += optind; |
@@ -315,7 +315,7 @@ USE_DESKTOP(long long) int unpack_unlzma(void) | |||
315 | } | 315 | } |
316 | 316 | ||
317 | int unlzma_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 317 | int unlzma_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
318 | int unlzma_main(int argc ATTRIBUTE_UNUSED, char **argv) | 318 | int unlzma_main(int argc UNUSED_PARAM, char **argv) |
319 | { | 319 | { |
320 | getopt32(argv, "cf"); | 320 | getopt32(argv, "cf"); |
321 | argv += optind; | 321 | argv += optind; |
@@ -357,7 +357,7 @@ USE_DESKTOP(long long) int unpack_uncompress(void) | |||
357 | } | 357 | } |
358 | 358 | ||
359 | int uncompress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 359 | int uncompress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
360 | int uncompress_main(int argc ATTRIBUTE_UNUSED, char **argv) | 360 | int uncompress_main(int argc UNUSED_PARAM, char **argv) |
361 | { | 361 | { |
362 | getopt32(argv, "cf"); | 362 | getopt32(argv, "cf"); |
363 | argv += optind; | 363 | argv += optind; |
diff --git a/archival/bz/bzlib_private.h b/archival/bz/bzlib_private.h index 48676a391..6430ce407 100644 --- a/archival/bz/bzlib_private.h +++ b/archival/bz/bzlib_private.h | |||
@@ -33,7 +33,7 @@ typedef unsigned char Bool; | |||
33 | #define False ((Bool)0) | 33 | #define False ((Bool)0) |
34 | 34 | ||
35 | #if BZ_LIGHT_DEBUG | 35 | #if BZ_LIGHT_DEBUG |
36 | static void bz_assert_fail(int errcode) ATTRIBUTE_NORETURN; | 36 | static void bz_assert_fail(int errcode) NORETURN; |
37 | #define AssertH(cond, errcode) \ | 37 | #define AssertH(cond, errcode) \ |
38 | do { \ | 38 | do { \ |
39 | if (!(cond)) \ | 39 | if (!(cond)) \ |
@@ -170,7 +170,7 @@ typedef struct EState { | |||
170 | 170 | ||
171 | /* map of bytes used in block */ | 171 | /* map of bytes used in block */ |
172 | int32_t nInUse; | 172 | int32_t nInUse; |
173 | Bool inUse[256] __attribute__(( aligned(sizeof(long)) )); | 173 | Bool inUse[256] ALIGNED(sizeof(long)); |
174 | uint8_t unseqToSeq[256]; | 174 | uint8_t unseqToSeq[256]; |
175 | 175 | ||
176 | /* stuff for coding the MTF values */ | 176 | /* stuff for coding the MTF values */ |
diff --git a/archival/bzip2.c b/archival/bzip2.c index 62df4aab8..1149cad2a 100644 --- a/archival/bzip2.c +++ b/archival/bzip2.c | |||
@@ -141,7 +141,7 @@ char* make_new_name_bzip2(char *filename) | |||
141 | } | 141 | } |
142 | 142 | ||
143 | int bzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 143 | int bzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
144 | int bzip2_main(int argc ATTRIBUTE_UNUSED, char **argv) | 144 | int bzip2_main(int argc UNUSED_PARAM, char **argv) |
145 | { | 145 | { |
146 | unsigned opt; | 146 | unsigned opt; |
147 | 147 | ||
diff --git a/archival/cpio.c b/archival/cpio.c index a10bfa85f..4c9fb1f65 100644 --- a/archival/cpio.c +++ b/archival/cpio.c | |||
@@ -191,7 +191,7 @@ static int cpio_o(void) | |||
191 | #endif | 191 | #endif |
192 | 192 | ||
193 | int cpio_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 193 | int cpio_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
194 | int cpio_main(int argc ATTRIBUTE_UNUSED, char **argv) | 194 | int cpio_main(int argc UNUSED_PARAM, char **argv) |
195 | { | 195 | { |
196 | archive_handle_t *archive_handle; | 196 | archive_handle_t *archive_handle; |
197 | char *cpio_filename; | 197 | char *cpio_filename; |
diff --git a/archival/dpkg.c b/archival/dpkg.c index 22e26f566..637afceef 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c | |||
@@ -1583,7 +1583,7 @@ static void configure_package(deb_file_t *deb_file) | |||
1583 | } | 1583 | } |
1584 | 1584 | ||
1585 | int dpkg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 1585 | int dpkg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
1586 | int dpkg_main(int argc ATTRIBUTE_UNUSED, char **argv) | 1586 | int dpkg_main(int argc UNUSED_PARAM, char **argv) |
1587 | { | 1587 | { |
1588 | deb_file_t **deb_file = NULL; | 1588 | deb_file_t **deb_file = NULL; |
1589 | status_node_t *status_node; | 1589 | status_node_t *status_node; |
diff --git a/archival/gzip.c b/archival/gzip.c index 5c9d6b3b2..ee051356e 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
@@ -2043,7 +2043,7 @@ int gzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | |||
2043 | #if ENABLE_GUNZIP | 2043 | #if ENABLE_GUNZIP |
2044 | int gzip_main(int argc, char **argv) | 2044 | int gzip_main(int argc, char **argv) |
2045 | #else | 2045 | #else |
2046 | int gzip_main(int argc ATTRIBUTE_UNUSED, char **argv) | 2046 | int gzip_main(int argc UNUSED_PARAM, char **argv) |
2047 | #endif | 2047 | #endif |
2048 | { | 2048 | { |
2049 | unsigned opt; | 2049 | unsigned opt; |
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c index 3b0ca846a..f25808a1a 100644 --- a/archival/libunarchive/decompress_unzip.c +++ b/archival/libunarchive/decompress_unzip.c | |||
@@ -244,7 +244,7 @@ static void huft_free_all(STATE_PARAM_ONLY) | |||
244 | inflate_codes_td = NULL; | 244 | inflate_codes_td = NULL; |
245 | } | 245 | } |
246 | 246 | ||
247 | static void abort_unzip(STATE_PARAM_ONLY) ATTRIBUTE_NORETURN; | 247 | static void abort_unzip(STATE_PARAM_ONLY) NORETURN; |
248 | static void abort_unzip(STATE_PARAM_ONLY) | 248 | static void abort_unzip(STATE_PARAM_ONLY) |
249 | { | 249 | { |
250 | huft_free_all(PASS_STATE_ONLY); | 250 | huft_free_all(PASS_STATE_ONLY); |
diff --git a/archival/libunarchive/header_skip.c b/archival/libunarchive/header_skip.c index ba4c0ab4b..a97a9ce80 100644 --- a/archival/libunarchive/header_skip.c +++ b/archival/libunarchive/header_skip.c | |||
@@ -5,6 +5,6 @@ | |||
5 | #include "libbb.h" | 5 | #include "libbb.h" |
6 | #include "unarchive.h" | 6 | #include "unarchive.h" |
7 | 7 | ||
8 | void FAST_FUNC header_skip(const file_header_t *file_header ATTRIBUTE_UNUSED) | 8 | void FAST_FUNC header_skip(const file_header_t *file_header UNUSED_PARAM) |
9 | { | 9 | { |
10 | } | 10 | } |
diff --git a/archival/tar.c b/archival/tar.c index bb8920ab2..13cdbd930 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -397,7 +397,7 @@ static int exclude_file(const llist_t *excluded_files, const char *file) | |||
397 | #endif | 397 | #endif |
398 | 398 | ||
399 | static int FAST_FUNC writeFileToTarball(const char *fileName, struct stat *statbuf, | 399 | static int FAST_FUNC writeFileToTarball(const char *fileName, struct stat *statbuf, |
400 | void *userData, int depth ATTRIBUTE_UNUSED) | 400 | void *userData, int depth UNUSED_PARAM) |
401 | { | 401 | { |
402 | struct TarBallInfo *tbInfo = (struct TarBallInfo *) userData; | 402 | struct TarBallInfo *tbInfo = (struct TarBallInfo *) userData; |
403 | const char *header_name; | 403 | const char *header_name; |
@@ -800,7 +800,7 @@ static const char tar_longopts[] ALIGN1 = | |||
800 | #endif | 800 | #endif |
801 | 801 | ||
802 | int tar_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 802 | int tar_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
803 | int tar_main(int argc ATTRIBUTE_UNUSED, char **argv) | 803 | int tar_main(int argc UNUSED_PARAM, char **argv) |
804 | { | 804 | { |
805 | char FAST_FUNC (*get_header_ptr)(archive_handle_t *) = get_header_tar; | 805 | char FAST_FUNC (*get_header_ptr)(archive_handle_t *) = get_header_tar; |
806 | archive_handle_t *tar_handle; | 806 | archive_handle_t *tar_handle; |
diff --git a/archival/unzip.c b/archival/unzip.c index 2c8971295..7c92f5d9a 100644 --- a/archival/unzip.c +++ b/archival/unzip.c | |||
@@ -51,13 +51,13 @@ typedef union { | |||
51 | uint16_t method; /* 4-5 */ | 51 | uint16_t method; /* 4-5 */ |
52 | uint16_t modtime; /* 6-7 */ | 52 | uint16_t modtime; /* 6-7 */ |
53 | uint16_t moddate; /* 8-9 */ | 53 | uint16_t moddate; /* 8-9 */ |
54 | uint32_t crc32 ATTRIBUTE_PACKED; /* 10-13 */ | 54 | uint32_t crc32 PACKED; /* 10-13 */ |
55 | uint32_t cmpsize ATTRIBUTE_PACKED; /* 14-17 */ | 55 | uint32_t cmpsize PACKED; /* 14-17 */ |
56 | uint32_t ucmpsize ATTRIBUTE_PACKED; /* 18-21 */ | 56 | uint32_t ucmpsize PACKED; /* 18-21 */ |
57 | uint16_t filename_len; /* 22-23 */ | 57 | uint16_t filename_len; /* 22-23 */ |
58 | uint16_t extra_len; /* 24-25 */ | 58 | uint16_t extra_len; /* 24-25 */ |
59 | } formatted ATTRIBUTE_PACKED; | 59 | } formatted PACKED; |
60 | } zip_header_t; /* ATTRIBUTE_PACKED - gcc 4.2.1 doesn't like it (spews warning) */ | 60 | } zip_header_t; /* PACKED - gcc 4.2.1 doesn't like it (spews warning) */ |
61 | 61 | ||
62 | /* Check the offset of the last element, not the length. This leniency | 62 | /* Check the offset of the last element, not the length. This leniency |
63 | * allows for poor packing, whereby the overall struct may be too long, | 63 | * allows for poor packing, whereby the overall struct may be too long, |
diff --git a/console-tools/clear.c b/console-tools/clear.c index 0d94e35b8..8b727b39b 100644 --- a/console-tools/clear.c +++ b/console-tools/clear.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "libbb.h" | 13 | #include "libbb.h" |
14 | 14 | ||
15 | int clear_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 15 | int clear_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
16 | int clear_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 16 | int clear_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
17 | { | 17 | { |
18 | return printf("\033[H\033[J") != 6; | 18 | return printf("\033[H\033[J") != 6; |
19 | } | 19 | } |
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c index 1200cae1d..e9a3989c7 100644 --- a/console-tools/deallocvt.c +++ b/console-tools/deallocvt.c | |||
@@ -16,7 +16,7 @@ | |||
16 | enum { VT_DISALLOCATE = 0x5608 }; /* free memory associated to vt */ | 16 | enum { VT_DISALLOCATE = 0x5608 }; /* free memory associated to vt */ |
17 | 17 | ||
18 | int deallocvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 18 | int deallocvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
19 | int deallocvt_main(int argc ATTRIBUTE_UNUSED, char **argv) | 19 | int deallocvt_main(int argc UNUSED_PARAM, char **argv) |
20 | { | 20 | { |
21 | /* num = 0 deallocate all unused consoles */ | 21 | /* num = 0 deallocate all unused consoles */ |
22 | int num = 0; | 22 | int num = 0; |
diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c index 1adfdd738..1d6bbdc63 100644 --- a/console-tools/dumpkmap.c +++ b/console-tools/dumpkmap.c | |||
@@ -24,7 +24,7 @@ struct kbentry { | |||
24 | #define MAX_NR_KEYMAPS 256 | 24 | #define MAX_NR_KEYMAPS 256 |
25 | 25 | ||
26 | int dumpkmap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 26 | int dumpkmap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
27 | int dumpkmap_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv) | 27 | int dumpkmap_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
28 | { | 28 | { |
29 | struct kbentry ke; | 29 | struct kbentry ke; |
30 | int i, j, fd; | 30 | int i, j, fd; |
diff --git a/console-tools/kbd_mode.c b/console-tools/kbd_mode.c index 161495719..e15588137 100644 --- a/console-tools/kbd_mode.c +++ b/console-tools/kbd_mode.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/kd.h> | 14 | #include <linux/kd.h> |
15 | 15 | ||
16 | int kbd_mode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 16 | int kbd_mode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
17 | int kbd_mode_main(int ATTRIBUTE_UNUSED argc, char **argv) | 17 | int kbd_mode_main(int argc UNUSED_PARAM, char **argv) |
18 | { | 18 | { |
19 | int fd; | 19 | int fd; |
20 | unsigned opt; | 20 | unsigned opt; |
diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c index 843f4b035..48b298002 100644 --- a/console-tools/loadfont.c +++ b/console-tools/loadfont.c | |||
@@ -167,7 +167,7 @@ static void loadnewfont(int fd) | |||
167 | } | 167 | } |
168 | 168 | ||
169 | int loadfont_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 169 | int loadfont_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
170 | int loadfont_main(int argc, char **argv ATTRIBUTE_UNUSED) | 170 | int loadfont_main(int argc, char **argv UNUSED_PARAM) |
171 | { | 171 | { |
172 | int fd; | 172 | int fd; |
173 | 173 | ||
diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c index 28e53ebca..b891c9b0e 100644 --- a/console-tools/loadkmap.c +++ b/console-tools/loadkmap.c | |||
@@ -26,7 +26,7 @@ struct kbentry { | |||
26 | #define MAX_NR_KEYMAPS 256 | 26 | #define MAX_NR_KEYMAPS 256 |
27 | 27 | ||
28 | int loadkmap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 28 | int loadkmap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
29 | int loadkmap_main(int ATTRIBUTE_UNUSED argc, char **argv ATTRIBUTE_UNUSED) | 29 | int loadkmap_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
30 | { | 30 | { |
31 | struct kbentry ke; | 31 | struct kbentry ke; |
32 | int i, j, fd; | 32 | int i, j, fd; |
diff --git a/console-tools/openvt.c b/console-tools/openvt.c index 208522418..0906de46f 100644 --- a/console-tools/openvt.c +++ b/console-tools/openvt.c | |||
@@ -105,7 +105,7 @@ static NOINLINE void vfork_child(char **argv) | |||
105 | } | 105 | } |
106 | 106 | ||
107 | int openvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 107 | int openvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
108 | int openvt_main(int argc ATTRIBUTE_UNUSED, char **argv) | 108 | int openvt_main(int argc UNUSED_PARAM, char **argv) |
109 | { | 109 | { |
110 | char vtname[sizeof(VC_FORMAT) + sizeof(int)*3]; | 110 | char vtname[sizeof(VC_FORMAT) + sizeof(int)*3]; |
111 | struct vt_stat vtstat; | 111 | struct vt_stat vtstat; |
diff --git a/console-tools/reset.c b/console-tools/reset.c index 5d5d4e27b..6917eda42 100644 --- a/console-tools/reset.c +++ b/console-tools/reset.c | |||
@@ -18,7 +18,7 @@ int stty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | |||
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | int reset_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 20 | int reset_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
21 | int reset_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 21 | int reset_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
22 | { | 22 | { |
23 | static const char *const args[] = { | 23 | static const char *const args[] = { |
24 | "stty", "sane", NULL | 24 | "stty", "sane", NULL |
diff --git a/console-tools/resize.c b/console-tools/resize.c index 8a50f9dcd..ea7fe5fca 100644 --- a/console-tools/resize.c +++ b/console-tools/resize.c | |||
@@ -14,14 +14,14 @@ | |||
14 | #define old_termios (*(struct termios*)&bb_common_bufsiz1) | 14 | #define old_termios (*(struct termios*)&bb_common_bufsiz1) |
15 | 15 | ||
16 | static void | 16 | static void |
17 | onintr(int sig ATTRIBUTE_UNUSED) | 17 | onintr(int sig UNUSED_PARAM) |
18 | { | 18 | { |
19 | tcsetattr(STDERR_FILENO, TCSANOW, &old_termios); | 19 | tcsetattr(STDERR_FILENO, TCSANOW, &old_termios); |
20 | exit(EXIT_FAILURE); | 20 | exit(EXIT_FAILURE); |
21 | } | 21 | } |
22 | 22 | ||
23 | int resize_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 23 | int resize_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
24 | int resize_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 24 | int resize_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
25 | { | 25 | { |
26 | struct termios new; | 26 | struct termios new; |
27 | struct winsize w = { 0, 0, 0, 0 }; | 27 | struct winsize w = { 0, 0, 0, 0 }; |
diff --git a/console-tools/setconsole.c b/console-tools/setconsole.c index 82fe83f22..b685937ae 100644 --- a/console-tools/setconsole.c +++ b/console-tools/setconsole.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include "libbb.h" | 11 | #include "libbb.h" |
12 | 12 | ||
13 | int setconsole_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 13 | int setconsole_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
14 | int setconsole_main(int ATTRIBUTE_UNUSED argc, char **argv) | 14 | int setconsole_main(int argc UNUSED_PARAM, char **argv) |
15 | { | 15 | { |
16 | const char *device = CURRENT_TTY; | 16 | const char *device = CURRENT_TTY; |
17 | bool reset; | 17 | bool reset; |
diff --git a/console-tools/setlogcons.c b/console-tools/setlogcons.c index aa8e0806f..dd44591a3 100644 --- a/console-tools/setlogcons.c +++ b/console-tools/setlogcons.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include "libbb.h" | 12 | #include "libbb.h" |
13 | 13 | ||
14 | int setlogcons_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 14 | int setlogcons_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
15 | int setlogcons_main(int argc ATTRIBUTE_UNUSED, char **argv) | 15 | int setlogcons_main(int argc UNUSED_PARAM, char **argv) |
16 | { | 16 | { |
17 | struct { | 17 | struct { |
18 | char fn; | 18 | char fn; |
diff --git a/coreutils/cat.c b/coreutils/cat.c index 989147b39..0024eb8d5 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c | |||
@@ -40,7 +40,7 @@ int bb_cat(char **argv) | |||
40 | } | 40 | } |
41 | 41 | ||
42 | int cat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 42 | int cat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
43 | int cat_main(int argc ATTRIBUTE_UNUSED, char **argv) | 43 | int cat_main(int argc UNUSED_PARAM, char **argv) |
44 | { | 44 | { |
45 | getopt32(argv, "u"); | 45 | getopt32(argv, "u"); |
46 | argv += optind; | 46 | argv += optind; |
diff --git a/coreutils/catv.c b/coreutils/catv.c index b87740ec9..ff3139c80 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 ATTRIBUTE_UNUSED, char **argv) | 16 | int catv_main(int argc UNUSED_PARAM, 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 994308c89..40f681fb6 100644 --- a/coreutils/chmod.c +++ b/coreutils/chmod.c | |||
@@ -68,7 +68,7 @@ static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf, void | |||
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 ATTRIBUTE_UNUSED, char **argv) | 71 | int chmod_main(int argc UNUSED_PARAM, 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 c14c62db6..b3d974ae4 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 FAST_FUNC fileAction(const char *fileName, struct stat *statbuf, | 44 | static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf, |
45 | void *cf, int depth ATTRIBUTE_UNUSED) | 45 | void *cf, int depth UNUSED_PARAM) |
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; |
@@ -61,7 +61,7 @@ static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf, | |||
61 | return FALSE; | 61 | return FALSE; |
62 | } | 62 | } |
63 | 63 | ||
64 | int chown_main(int argc ATTRIBUTE_UNUSED, char **argv) | 64 | int chown_main(int argc UNUSED_PARAM, char **argv) |
65 | { | 65 | { |
66 | int retval = EXIT_SUCCESS; | 66 | int retval = EXIT_SUCCESS; |
67 | int flags; | 67 | int flags; |
diff --git a/coreutils/cksum.c b/coreutils/cksum.c index 074d06811..598718486 100644 --- a/coreutils/cksum.c +++ b/coreutils/cksum.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include "libbb.h" | 9 | #include "libbb.h" |
10 | 10 | ||
11 | int cksum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 11 | int cksum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
12 | int cksum_main(int argc ATTRIBUTE_UNUSED, char **argv) | 12 | int cksum_main(int argc UNUSED_PARAM, char **argv) |
13 | { | 13 | { |
14 | uint32_t *crc32_table = crc32_filltable(NULL, 1); | 14 | uint32_t *crc32_table = crc32_filltable(NULL, 1); |
15 | uint32_t crc; | 15 | uint32_t crc; |
diff --git a/coreutils/comm.c b/coreutils/comm.c index 4dbc0d477..b62c98772 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 ATTRIBUTE_UNUSED, char **argv) | 39 | int comm_main(int argc UNUSED_PARAM, 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 1634fc8c8..179854988 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 ATTRIBUTE_UNUSED, char **argv) | 165 | int cut_main(int argc UNUSED_PARAM, 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/date.c b/coreutils/date.c index 5b0f60f1a..8469190cf 100644 --- a/coreutils/date.c +++ b/coreutils/date.c | |||
@@ -39,7 +39,7 @@ static void maybe_set_utc(int opt) | |||
39 | } | 39 | } |
40 | 40 | ||
41 | int date_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 41 | int date_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
42 | int date_main(int argc ATTRIBUTE_UNUSED, char **argv) | 42 | int date_main(int argc UNUSED_PARAM, char **argv) |
43 | { | 43 | { |
44 | struct tm tm_time; | 44 | struct tm tm_time; |
45 | time_t tm; | 45 | time_t tm; |
diff --git a/coreutils/dd.c b/coreutils/dd.c index 6b66366b6..8a40aa77f 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c | |||
@@ -41,7 +41,7 @@ struct globals { | |||
41 | #define INIT_G() memset(&G, 0, sizeof(G)) | 41 | #define INIT_G() memset(&G, 0, sizeof(G)) |
42 | 42 | ||
43 | 43 | ||
44 | static void dd_output_status(int ATTRIBUTE_UNUSED cur_signal) | 44 | static void dd_output_status(int UNUSED_PARAM cur_signal) |
45 | { | 45 | { |
46 | /* Deliberately using %u, not %d */ | 46 | /* Deliberately using %u, not %d */ |
47 | fprintf(stderr, "%"OFF_FMT"u+%"OFF_FMT"u records in\n" | 47 | fprintf(stderr, "%"OFF_FMT"u+%"OFF_FMT"u records in\n" |
@@ -79,7 +79,7 @@ static bool write_and_stats(const void *buf, size_t len, size_t obs, | |||
79 | #endif | 79 | #endif |
80 | 80 | ||
81 | int dd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 81 | int dd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
82 | int dd_main(int argc ATTRIBUTE_UNUSED, char **argv) | 82 | int dd_main(int argc UNUSED_PARAM, char **argv) |
83 | { | 83 | { |
84 | enum { | 84 | enum { |
85 | /* Must be in the same order as OP_conv_XXX! */ | 85 | /* Must be in the same order as OP_conv_XXX! */ |
diff --git a/coreutils/du.c b/coreutils/du.c index b469824ea..efc9bb9fa 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 ATTRIBUTE_UNUSED, char **argv) | 144 | int du_main(int argc UNUSED_PARAM, 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 cc9b9e6f4..36cb6b3af 100644 --- a/coreutils/echo.c +++ b/coreutils/echo.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | /* NB: can be used by shell even if not enabled as applet */ | 30 | /* NB: can be used by shell even if not enabled as applet */ |
31 | 31 | ||
32 | int echo_main(int argc ATTRIBUTE_UNUSED, char **argv) | 32 | int echo_main(int argc UNUSED_PARAM, char **argv) |
33 | { | 33 | { |
34 | const char *arg; | 34 | const char *arg; |
35 | #if !ENABLE_FEATURE_FANCY_ECHO | 35 | #if !ENABLE_FEATURE_FANCY_ECHO |
diff --git a/coreutils/env.c b/coreutils/env.c index 8d8753e8b..66199e8d6 100644 --- a/coreutils/env.c +++ b/coreutils/env.c | |||
@@ -39,7 +39,7 @@ static const char env_longopts[] ALIGN1 = | |||
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | int env_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 41 | int env_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
42 | int env_main(int argc ATTRIBUTE_UNUSED, char **argv) | 42 | int env_main(int argc UNUSED_PARAM, char **argv) |
43 | { | 43 | { |
44 | /* cleanenv was static - why? */ | 44 | /* cleanenv was static - why? */ |
45 | char *cleanenv[1]; | 45 | char *cleanenv[1]; |
diff --git a/coreutils/expand.c b/coreutils/expand.c index af2ef8675..ee51c032f 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 ATTRIBUTE_UNUSED, char **argv) | 129 | int expand_main(int argc UNUSED_PARAM, 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/false.c b/coreutils/false.c index e3121363c..f448ebf72 100644 --- a/coreutils/false.c +++ b/coreutils/false.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 false_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 17 | int false_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
18 | int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv) | 18 | int false_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
19 | { | 19 | { |
20 | return EXIT_FAILURE; | 20 | return EXIT_FAILURE; |
21 | } | 21 | } |
diff --git a/coreutils/hostid.c b/coreutils/hostid.c index 433eccc45..2794510a7 100644 --- a/coreutils/hostid.c +++ b/coreutils/hostid.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 hostid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 16 | int hostid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
17 | int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv) | 17 | int hostid_main(int argc, char **argv UNUSED_PARAM) |
18 | { | 18 | { |
19 | if (argc > 1) { | 19 | if (argc > 1) { |
20 | bb_show_usage(); | 20 | bb_show_usage(); |
diff --git a/coreutils/id.c b/coreutils/id.c index 9afb10088..0fadd98d3 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 ATTRIBUTE_UNUSED, char **argv) | 40 | int id_main(int argc UNUSED_PARAM, char **argv) |
41 | { | 41 | { |
42 | struct passwd *p; | 42 | struct passwd *p; |
43 | uid_t uid; | 43 | uid_t uid; |
diff --git a/coreutils/logname.c b/coreutils/logname.c index 09fd3960d..3400c30d9 100644 --- a/coreutils/logname.c +++ b/coreutils/logname.c | |||
@@ -25,7 +25,7 @@ | |||
25 | /* This is a NOFORK applet. Be very careful! */ | 25 | /* This is a NOFORK applet. Be very careful! */ |
26 | 26 | ||
27 | int logname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 27 | int logname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
28 | int logname_main(int argc, char ATTRIBUTE_UNUSED **argv) | 28 | int logname_main(int argc, char **argv UNUSED_PARAM) |
29 | { | 29 | { |
30 | char buf[128]; | 30 | char buf[128]; |
31 | 31 | ||
diff --git a/coreutils/ls.c b/coreutils/ls.c index 7fddefef5..a76ced1b9 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -825,7 +825,7 @@ static const char ls_color_opt[] ALIGN1 = | |||
825 | 825 | ||
826 | 826 | ||
827 | int ls_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 827 | int ls_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
828 | int ls_main(int argc ATTRIBUTE_UNUSED, char **argv) | 828 | int ls_main(int argc UNUSED_PARAM, char **argv) |
829 | { | 829 | { |
830 | struct dnode **dnd; | 830 | struct dnode **dnd; |
831 | struct dnode **dnf; | 831 | struct dnode **dnf; |
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c index 8690f4017..a5681589b 100644 --- a/coreutils/md5_sha1_sum.c +++ b/coreutils/md5_sha1_sum.c | |||
@@ -75,7 +75,7 @@ static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo) | |||
75 | } | 75 | } |
76 | 76 | ||
77 | int md5_sha1_sum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 77 | int md5_sha1_sum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
78 | int md5_sha1_sum_main(int argc ATTRIBUTE_UNUSED, char **argv) | 78 | int md5_sha1_sum_main(int argc UNUSED_PARAM, char **argv) |
79 | { | 79 | { |
80 | int return_value = EXIT_SUCCESS; | 80 | int return_value = EXIT_SUCCESS; |
81 | uint8_t *hash_value; | 81 | uint8_t *hash_value; |
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c index d9261b96a..65494609c 100644 --- a/coreutils/mkfifo.c +++ b/coreutils/mkfifo.c | |||
@@ -14,7 +14,7 @@ | |||
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 ATTRIBUTE_UNUSED, char **argv) | 17 | int mkfifo_main(int argc UNUSED_PARAM, char **argv) |
18 | { | 18 | { |
19 | mode_t mode; | 19 | mode_t mode; |
20 | int retval = EXIT_SUCCESS; | 20 | int retval = EXIT_SUCCESS; |
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c index ce963db8a..a2eaf11d9 100644 --- a/coreutils/od_bloaty.c +++ b/coreutils/od_bloaty.c | |||
@@ -364,7 +364,7 @@ print_long_double(size_t n_bytes, const char *block, const char *fmt_string) | |||
364 | 364 | ||
365 | static void | 365 | static void |
366 | print_named_ascii(size_t n_bytes, const char *block, | 366 | print_named_ascii(size_t n_bytes, const char *block, |
367 | const char *unused_fmt_string ATTRIBUTE_UNUSED) | 367 | const char *unused_fmt_string UNUSED_PARAM) |
368 | { | 368 | { |
369 | /* Names for some non-printing characters. */ | 369 | /* Names for some non-printing characters. */ |
370 | static const char charname[33][3] ALIGN1 = { | 370 | static const char charname[33][3] ALIGN1 = { |
@@ -404,7 +404,7 @@ print_named_ascii(size_t n_bytes, const char *block, | |||
404 | 404 | ||
405 | static void | 405 | static void |
406 | print_ascii(size_t n_bytes, const char *block, | 406 | print_ascii(size_t n_bytes, const char *block, |
407 | const char *unused_fmt_string ATTRIBUTE_UNUSED) | 407 | const char *unused_fmt_string UNUSED_PARAM) |
408 | { | 408 | { |
409 | // buf[N] pos: 01234 56789 | 409 | // buf[N] pos: 01234 56789 |
410 | char buf[12] = " x\0 0xx\0"; | 410 | char buf[12] = " x\0 0xx\0"; |
@@ -814,7 +814,7 @@ skip(off_t n_skip) | |||
814 | typedef void FN_format_address(off_t address, char c); | 814 | typedef void FN_format_address(off_t address, char c); |
815 | 815 | ||
816 | static void | 816 | static void |
817 | format_address_none(off_t address ATTRIBUTE_UNUSED, char c ATTRIBUTE_UNUSED) | 817 | format_address_none(off_t address UNUSED_PARAM, char c UNUSED_PARAM) |
818 | { | 818 | { |
819 | } | 819 | } |
820 | 820 | ||
diff --git a/coreutils/printenv.c b/coreutils/printenv.c index 2fc01f22f..6971f7258 100644 --- a/coreutils/printenv.c +++ b/coreutils/printenv.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include "libbb.h" | 11 | #include "libbb.h" |
12 | 12 | ||
13 | int printenv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 13 | int printenv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
14 | int printenv_main(int argc ATTRIBUTE_UNUSED, char **argv) | 14 | int printenv_main(int argc UNUSED_PARAM, char **argv) |
15 | { | 15 | { |
16 | /* no variables specified, show whole env */ | 16 | /* no variables specified, show whole env */ |
17 | if (!argv[1]) { | 17 | if (!argv[1]) { |
diff --git a/coreutils/printf.c b/coreutils/printf.c index b7752369c..a14306f5a 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c | |||
@@ -279,7 +279,7 @@ static char **print_formatted(char *f, char **argv) | |||
279 | return argv; | 279 | return argv; |
280 | } | 280 | } |
281 | 281 | ||
282 | int printf_main(int argc ATTRIBUTE_UNUSED, char **argv) | 282 | int printf_main(int argc UNUSED_PARAM, char **argv) |
283 | { | 283 | { |
284 | char *format; | 284 | char *format; |
285 | char **argv2; | 285 | char **argv2; |
diff --git a/coreutils/pwd.c b/coreutils/pwd.c index 9279dbee6..57953d246 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 ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 15 | int pwd_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
16 | { | 16 | { |
17 | char *buf; | 17 | char *buf; |
18 | 18 | ||
diff --git a/coreutils/readlink.c b/coreutils/readlink.c index 0c45e1234..721fd8597 100644 --- a/coreutils/readlink.c +++ b/coreutils/readlink.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include "libbb.h" | 10 | #include "libbb.h" |
11 | 11 | ||
12 | int readlink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 12 | int readlink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
13 | int readlink_main(int argc ATTRIBUTE_UNUSED, char **argv) | 13 | int readlink_main(int argc UNUSED_PARAM, char **argv) |
14 | { | 14 | { |
15 | char *buf; | 15 | char *buf; |
16 | char *fname; | 16 | char *fname; |
diff --git a/coreutils/realpath.c b/coreutils/realpath.c index 6766524a7..28906ba55 100644 --- a/coreutils/realpath.c +++ b/coreutils/realpath.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "libbb.h" | 13 | #include "libbb.h" |
14 | 14 | ||
15 | int realpath_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 15 | int realpath_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
16 | int realpath_main(int argc ATTRIBUTE_UNUSED, char **argv) | 16 | int realpath_main(int argc UNUSED_PARAM, char **argv) |
17 | { | 17 | { |
18 | int retval = EXIT_SUCCESS; | 18 | int retval = EXIT_SUCCESS; |
19 | 19 | ||
diff --git a/coreutils/rm.c b/coreutils/rm.c index 1774ce296..975f2267b 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 ATTRIBUTE_UNUSED, char **argv) | 23 | int rm_main(int argc UNUSED_PARAM, 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 cb6046617..2450a43a3 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 ATTRIBUTE_UNUSED, char **argv) | 22 | int rmdir_main(int argc UNUSED_PARAM, char **argv) |
23 | { | 23 | { |
24 | int status = EXIT_SUCCESS; | 24 | int status = EXIT_SUCCESS; |
25 | int flags; | 25 | int flags; |
diff --git a/coreutils/sleep.c b/coreutils/sleep.c index 78f9a8ebf..162d82006 100644 --- a/coreutils/sleep.c +++ b/coreutils/sleep.c | |||
@@ -34,7 +34,7 @@ static const struct suffix_mult sfx[] = { | |||
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | int sleep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 36 | int sleep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
37 | int sleep_main(int argc ATTRIBUTE_UNUSED, char **argv) | 37 | int sleep_main(int argc UNUSED_PARAM, char **argv) |
38 | { | 38 | { |
39 | unsigned duration; | 39 | unsigned duration; |
40 | 40 | ||
diff --git a/coreutils/sort.c b/coreutils/sort.c index 1f531fb76..1fa552725 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c | |||
@@ -276,7 +276,7 @@ static unsigned str2u(char **str) | |||
276 | #endif | 276 | #endif |
277 | 277 | ||
278 | int sort_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 278 | int sort_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
279 | int sort_main(int argc ATTRIBUTE_UNUSED, char **argv) | 279 | int sort_main(int argc UNUSED_PARAM, char **argv) |
280 | { | 280 | { |
281 | FILE *fp, *outfile = stdout; | 281 | FILE *fp, *outfile = stdout; |
282 | char *line, **lines = NULL; | 282 | char *line, **lines = NULL; |
diff --git a/coreutils/split.c b/coreutils/split.c index 39f62e6dd..77cb66d53 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 ATTRIBUTE_UNUSED, char **argv) | 59 | int split_main(int argc UNUSED_PARAM, char **argv) |
60 | { | 60 | { |
61 | unsigned suffix_len = 2; | 61 | unsigned suffix_len = 2; |
62 | char *pfx; | 62 | char *pfx; |
diff --git a/coreutils/stty.c b/coreutils/stty.c index c9f11a8da..3605e3c29 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c | |||
@@ -692,7 +692,7 @@ static void set_speed_or_die(enum speed_setting type, const char *const arg, | |||
692 | } | 692 | } |
693 | } | 693 | } |
694 | 694 | ||
695 | static ATTRIBUTE_NORETURN void perror_on_device_and_die(const char *fmt) | 695 | static NORETURN void perror_on_device_and_die(const char *fmt) |
696 | { | 696 | { |
697 | bb_perror_msg_and_die(fmt, G.device_name); | 697 | bb_perror_msg_and_die(fmt, G.device_name); |
698 | } | 698 | } |
@@ -851,7 +851,7 @@ static int recover_mode(const char *arg, struct termios *mode) | |||
851 | } | 851 | } |
852 | 852 | ||
853 | static void display_recoverable(const struct termios *mode, | 853 | static void display_recoverable(const struct termios *mode, |
854 | int ATTRIBUTE_UNUSED dummy) | 854 | int UNUSED_PARAM dummy) |
855 | { | 855 | { |
856 | int i; | 856 | int i; |
857 | printf("%lx:%lx:%lx:%lx", | 857 | printf("%lx:%lx:%lx:%lx", |
diff --git a/coreutils/sum.c b/coreutils/sum.c index e6cfbfd80..60f3b3007 100644 --- a/coreutils/sum.c +++ b/coreutils/sum.c | |||
@@ -71,7 +71,7 @@ static unsigned sum_file(const char *file, unsigned type) | |||
71 | } | 71 | } |
72 | 72 | ||
73 | int sum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 73 | int sum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
74 | int sum_main(int argc ATTRIBUTE_UNUSED, char **argv) | 74 | int sum_main(int argc UNUSED_PARAM, char **argv) |
75 | { | 75 | { |
76 | unsigned n; | 76 | unsigned n; |
77 | unsigned type = SUM_BSD; | 77 | unsigned type = SUM_BSD; |
diff --git a/coreutils/sync.c b/coreutils/sync.c index 5c9d0926f..f00a3d075 100644 --- a/coreutils/sync.c +++ b/coreutils/sync.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 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 ATTRIBUTE_UNUSED) | 17 | int sync_main(int argc, char **argv UNUSED_PARAM) |
18 | { | 18 | { |
19 | /* coreutils-6.9 compat */ | 19 | /* coreutils-6.9 compat */ |
20 | bb_warn_ignoring_args(argc - 1); | 20 | bb_warn_ignoring_args(argc - 1); |
diff --git a/coreutils/tac.c b/coreutils/tac.c index af70f3092..d70e23ad4 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 ATTRIBUTE_UNUSED, char **argv) | 29 | int tac_main(int argc UNUSED_PARAM, char **argv) |
30 | { | 30 | { |
31 | char **name; | 31 | char **name; |
32 | FILE *f; | 32 | FILE *f; |
diff --git a/coreutils/test.c b/coreutils/test.c index 270ca21a9..c7c530052 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
@@ -187,7 +187,7 @@ extern struct test_statics *const test_ptr_to_statics; | |||
187 | 187 | ||
188 | static arith_t primary(enum token n); | 188 | static arith_t primary(enum token n); |
189 | 189 | ||
190 | static void syntax(const char *op, const char *msg) ATTRIBUTE_NORETURN; | 190 | static void syntax(const char *op, const char *msg) NORETURN; |
191 | static void syntax(const char *op, const char *msg) | 191 | static void syntax(const char *op, const char *msg) |
192 | { | 192 | { |
193 | if (op && *op) { | 193 | if (op && *op) { |
diff --git a/coreutils/touch.c b/coreutils/touch.c index 78ae4a5c3..92f20235c 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c | |||
@@ -38,7 +38,7 @@ | |||
38 | */ | 38 | */ |
39 | 39 | ||
40 | int touch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 40 | int touch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
41 | int touch_main(int argc ATTRIBUTE_UNUSED, char **argv) | 41 | int touch_main(int argc UNUSED_PARAM, char **argv) |
42 | { | 42 | { |
43 | #if ENABLE_DESKTOP | 43 | #if ENABLE_DESKTOP |
44 | struct utimbuf timebuf; | 44 | struct utimbuf timebuf; |
diff --git a/coreutils/tr.c b/coreutils/tr.c index 8b2d30802..e439fcb5b 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 ATTRIBUTE_UNUSED, char **argv) | 177 | int tr_main(int argc UNUSED_PARAM, 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 565e68b83..8a7e6ae9e 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 ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 18 | int true_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
19 | { | 19 | { |
20 | return EXIT_SUCCESS; | 20 | return EXIT_SUCCESS; |
21 | } | 21 | } |
diff --git a/coreutils/tty.c b/coreutils/tty.c index 48e15117c..e83289440 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 SKIP_INCLUDE_SUSv2(ATTRIBUTE_UNUSED)) | 16 | int tty_main(int argc, char **argv SKIP_INCLUDE_SUSv2(UNUSED_PARAM)) |
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. */ |
diff --git a/coreutils/uname.c b/coreutils/uname.c index 76fd3ca8d..e28285c44 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c | |||
@@ -49,7 +49,7 @@ static const unsigned short utsname_offset[] = { | |||
49 | }; | 49 | }; |
50 | 50 | ||
51 | int uname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 51 | int uname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
52 | int uname_main(int argc ATTRIBUTE_UNUSED, char **argv) | 52 | int uname_main(int argc UNUSED_PARAM, char **argv) |
53 | { | 53 | { |
54 | uname_info_t uname_info; | 54 | uname_info_t uname_info; |
55 | #if defined(__sparc__) && defined(__linux__) | 55 | #if defined(__sparc__) && defined(__linux__) |
diff --git a/coreutils/uniq.c b/coreutils/uniq.c index 41f1fed7b..091862118 100644 --- a/coreutils/uniq.c +++ b/coreutils/uniq.c | |||
@@ -26,7 +26,7 @@ static FILE *xgetoptfile_uniq_s(char **argv, int read0write2) | |||
26 | } | 26 | } |
27 | 27 | ||
28 | int uniq_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 28 | int uniq_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
29 | int uniq_main(int argc ATTRIBUTE_UNUSED, char **argv) | 29 | int uniq_main(int argc UNUSED_PARAM, char **argv) |
30 | { | 30 | { |
31 | FILE *in, *out; | 31 | FILE *in, *out; |
32 | const char *s0, *e0, *s1, *e1, *input_filename; | 32 | const char *s0, *e0, *s1, *e1, *input_filename; |
diff --git a/coreutils/usleep.c b/coreutils/usleep.c index d34880d3a..e7acd5f82 100644 --- a/coreutils/usleep.c +++ b/coreutils/usleep.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 usleep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 16 | int usleep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
17 | int usleep_main(int argc ATTRIBUTE_UNUSED, char **argv) | 17 | int usleep_main(int argc UNUSED_PARAM, char **argv) |
18 | { | 18 | { |
19 | if (!argv[1]) { | 19 | if (!argv[1]) { |
20 | bb_show_usage(); | 20 | bb_show_usage(); |
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c index 8b18b7a73..81a86cb15 100644 --- a/coreutils/uudecode.c +++ b/coreutils/uudecode.c | |||
@@ -136,7 +136,7 @@ static void read_base64(FILE *src_stream, FILE *dst_stream) | |||
136 | } | 136 | } |
137 | 137 | ||
138 | int uudecode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 138 | int uudecode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
139 | int uudecode_main(int argc ATTRIBUTE_UNUSED, char **argv) | 139 | int uudecode_main(int argc UNUSED_PARAM, char **argv) |
140 | { | 140 | { |
141 | FILE *src_stream; | 141 | FILE *src_stream; |
142 | char *outname = NULL; | 142 | char *outname = NULL; |
diff --git a/coreutils/wc.c b/coreutils/wc.c index de3c895bd..d0e5482ca 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 ATTRIBUTE_UNUSED, char **argv) | 72 | int wc_main(int argc UNUSED_PARAM, 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 a206ec54b..a4ec740f0 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 ATTRIBUTE_UNUSED, char **argv) | 44 | int who_main(int argc UNUSED_PARAM, 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 d35572ece..6756d4ba9 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 ATTRIBUTE_UNUSED) | 17 | int whoami_main(int argc, char **argv UNUSED_PARAM) |
18 | { | 18 | { |
19 | if (argc > 1) | 19 | if (argc > 1) |
20 | bb_show_usage(); | 20 | bb_show_usage(); |
diff --git a/debianutils/mktemp.c b/debianutils/mktemp.c index c48b6e2d5..0dcb1e826 100644 --- a/debianutils/mktemp.c +++ b/debianutils/mktemp.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include "libbb.h" | 35 | #include "libbb.h" |
36 | 36 | ||
37 | int mktemp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 37 | int mktemp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
38 | int mktemp_main(int argc ATTRIBUTE_UNUSED, char **argv) | 38 | int mktemp_main(int argc UNUSED_PARAM, char **argv) |
39 | { | 39 | { |
40 | const char *path; | 40 | const char *path; |
41 | char *chp; | 41 | char *chp; |
diff --git a/debianutils/pipe_progress.c b/debianutils/pipe_progress.c index cbdd38ff4..fa98e8b38 100644 --- a/debianutils/pipe_progress.c +++ b/debianutils/pipe_progress.c | |||
@@ -15,7 +15,7 @@ | |||
15 | * Activity is indicated by a '.' to stderr | 15 | * Activity is indicated by a '.' to stderr |
16 | */ | 16 | */ |
17 | int pipe_progress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 17 | int pipe_progress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
18 | int pipe_progress_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 18 | int pipe_progress_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
19 | { | 19 | { |
20 | RESERVE_CONFIG_BUFFER(buf, PIPE_PROGRESS_SIZE); | 20 | RESERVE_CONFIG_BUFFER(buf, PIPE_PROGRESS_SIZE); |
21 | time_t t = time(NULL); | 21 | time_t t = time(NULL); |
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c index bf278cc65..953ff6732 100644 --- a/debianutils/run_parts.c +++ b/debianutils/run_parts.c | |||
@@ -77,7 +77,7 @@ static int bb_alphasort(const void *p1, const void *p2) | |||
77 | return (option_mask32 & OPT_r) ? -r : r; | 77 | return (option_mask32 & OPT_r) ? -r : r; |
78 | } | 78 | } |
79 | 79 | ||
80 | static int FAST_FUNC act(const char *file, struct stat *statbuf, void *args ATTRIBUTE_UNUSED, int depth) | 80 | static int FAST_FUNC act(const char *file, struct stat *statbuf, void *args UNUSED_PARAM, int depth) |
81 | { | 81 | { |
82 | if (depth == 1) | 82 | if (depth == 1) |
83 | return TRUE; | 83 | return TRUE; |
@@ -111,7 +111,7 @@ static const char runparts_longopts[] ALIGN1 = | |||
111 | #endif | 111 | #endif |
112 | 112 | ||
113 | int run_parts_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 113 | int run_parts_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
114 | int run_parts_main(int argc ATTRIBUTE_UNUSED, char **argv) | 114 | int run_parts_main(int argc UNUSED_PARAM, char **argv) |
115 | { | 115 | { |
116 | const char *umask_p = "22"; | 116 | const char *umask_p = "22"; |
117 | llist_t *arg_list = NULL; | 117 | llist_t *arg_list = NULL; |
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c index 459fb77e0..91f51a3c6 100644 --- a/debianutils/start_stop_daemon.c +++ b/debianutils/start_stop_daemon.c | |||
@@ -320,7 +320,7 @@ static const char start_stop_daemon_longopts[] ALIGN1 = | |||
320 | #endif | 320 | #endif |
321 | 321 | ||
322 | int start_stop_daemon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 322 | int start_stop_daemon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
323 | int start_stop_daemon_main(int argc ATTRIBUTE_UNUSED, char **argv) | 323 | int start_stop_daemon_main(int argc UNUSED_PARAM, char **argv) |
324 | { | 324 | { |
325 | unsigned opt; | 325 | unsigned opt; |
326 | char *signame; | 326 | char *signame; |
diff --git a/debianutils/which.c b/debianutils/which.c index 41a864cfa..748e6dc25 100644 --- a/debianutils/which.c +++ b/debianutils/which.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "libbb.h" | 13 | #include "libbb.h" |
14 | 14 | ||
15 | int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 15 | int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
16 | int which_main(int argc ATTRIBUTE_UNUSED, char **argv) | 16 | int which_main(int argc UNUSED_PARAM, char **argv) |
17 | { | 17 | { |
18 | USE_DESKTOP(int opt;) | 18 | USE_DESKTOP(int opt;) |
19 | int status = EXIT_SUCCESS; | 19 | int status = EXIT_SUCCESS; |
diff --git a/e2fsprogs/chattr.c b/e2fsprogs/chattr.c index e783d3e89..b41919be2 100644 --- a/e2fsprogs/chattr.c +++ b/e2fsprogs/chattr.c | |||
@@ -125,7 +125,7 @@ static void change_attributes(const char *name, struct globals *gp) | |||
125 | } | 125 | } |
126 | 126 | ||
127 | int chattr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 127 | int chattr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
128 | int chattr_main(int argc ATTRIBUTE_UNUSED, char **argv) | 128 | int chattr_main(int argc UNUSED_PARAM, char **argv) |
129 | { | 129 | { |
130 | struct globals g; | 130 | struct globals g; |
131 | char *arg; | 131 | char *arg; |
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c index 0707d295d..c17693699 100644 --- a/e2fsprogs/fsck.c +++ b/e2fsprogs/fsck.c | |||
@@ -1122,13 +1122,13 @@ static void parse_args(char **argv) | |||
1122 | max_running = xatoi(tmp); | 1122 | max_running = xatoi(tmp); |
1123 | } | 1123 | } |
1124 | 1124 | ||
1125 | static void signal_cancel(int sig ATTRIBUTE_UNUSED) | 1125 | static void signal_cancel(int sig UNUSED_PARAM) |
1126 | { | 1126 | { |
1127 | cancel_requested = 1; | 1127 | cancel_requested = 1; |
1128 | } | 1128 | } |
1129 | 1129 | ||
1130 | int fsck_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 1130 | int fsck_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
1131 | int fsck_main(int argc ATTRIBUTE_UNUSED, char **argv) | 1131 | int fsck_main(int argc UNUSED_PARAM, char **argv) |
1132 | { | 1132 | { |
1133 | int i, status; | 1133 | int i, status; |
1134 | /*int interactive;*/ | 1134 | /*int interactive;*/ |
diff --git a/e2fsprogs/lsattr.c b/e2fsprogs/lsattr.c index 066af86c7..23a54b72e 100644 --- a/e2fsprogs/lsattr.c +++ b/e2fsprogs/lsattr.c | |||
@@ -58,7 +58,7 @@ static void list_attributes(const char *name) | |||
58 | } | 58 | } |
59 | 59 | ||
60 | static int lsattr_dir_proc(const char *dir_name, struct dirent *de, | 60 | static int lsattr_dir_proc(const char *dir_name, struct dirent *de, |
61 | void *private ATTRIBUTE_UNUSED) | 61 | void *private UNUSED_PARAM) |
62 | { | 62 | { |
63 | struct stat st; | 63 | struct stat st; |
64 | char *path; | 64 | char *path; |
@@ -96,7 +96,7 @@ static void lsattr_args(const char *name) | |||
96 | } | 96 | } |
97 | 97 | ||
98 | int lsattr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 98 | int lsattr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
99 | int lsattr_main(int argc ATTRIBUTE_UNUSED, char **argv) | 99 | int lsattr_main(int argc UNUSED_PARAM, char **argv) |
100 | { | 100 | { |
101 | getopt32(argv, "Radlv"); | 101 | getopt32(argv, "Radlv"); |
102 | argv += optind; | 102 | argv += optind; |
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c b/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c index 63a0dcad9..ff11fe98c 100644 --- a/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c +++ b/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c | |||
@@ -78,7 +78,7 @@ errcode_t ext2fs_get_device_size(const char *file, int blocksize, | |||
78 | 78 | ||
79 | dev = CreateFile(file, GENERIC_READ, | 79 | dev = CreateFile(file, GENERIC_READ, |
80 | FILE_SHARE_READ | FILE_SHARE_WRITE , | 80 | FILE_SHARE_READ | FILE_SHARE_WRITE , |
81 | NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); | 81 | NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); |
82 | 82 | ||
83 | if (dev == INVALID_HANDLE_VALUE) | 83 | if (dev == INVALID_HANDLE_VALUE) |
84 | return EBADF; | 84 | return EBADF; |
diff --git a/e2fsprogs/old_e2fsprogs/uuid/uuid.h b/e2fsprogs/old_e2fsprogs/uuid/uuid.h index bd53b15d0..b30ca3c62 100644 --- a/e2fsprogs/old_e2fsprogs/uuid/uuid.h +++ b/e2fsprogs/old_e2fsprogs/uuid/uuid.h | |||
@@ -54,7 +54,7 @@ typedef unsigned char uuid_t[16]; | |||
54 | /* Allow UUID constants to be defined */ | 54 | /* Allow UUID constants to be defined */ |
55 | #ifdef __GNUC__ | 55 | #ifdef __GNUC__ |
56 | #define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ | 56 | #define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ |
57 | static const uuid_t name ATTRIBUTE_UNUSED = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} | 57 | static const uuid_t name UNUSED_PARAM = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} |
58 | #else | 58 | #else |
59 | #define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ | 59 | #define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ |
60 | static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} | 60 | static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} |
diff --git a/editors/awk.c b/editors/awk.c index aac40aa93..2af39880e 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -499,7 +499,7 @@ static void chain_group(void); | |||
499 | static var *evaluate(node *, var *); | 499 | static var *evaluate(node *, var *); |
500 | static rstream *next_input_file(void); | 500 | static rstream *next_input_file(void); |
501 | static int fmt_num(char *, int, const char *, double, int); | 501 | static int fmt_num(char *, int, const char *, double, int); |
502 | static int awk_exit(int) ATTRIBUTE_NORETURN; | 502 | static int awk_exit(int) NORETURN; |
503 | 503 | ||
504 | /* ---- error handling ---- */ | 504 | /* ---- error handling ---- */ |
505 | 505 | ||
@@ -521,7 +521,7 @@ static void zero_out_var(var * vp) | |||
521 | memset(vp, 0, sizeof(*vp)); | 521 | memset(vp, 0, sizeof(*vp)); |
522 | } | 522 | } |
523 | 523 | ||
524 | static void syntax_error(const char *const message) ATTRIBUTE_NORETURN; | 524 | static void syntax_error(const char *const message) NORETURN; |
525 | static void syntax_error(const char *const message) | 525 | static void syntax_error(const char *const message) |
526 | { | 526 | { |
527 | bb_error_msg_and_die("%s:%i: %s", g_progname, g_lineno, message); | 527 | bb_error_msg_and_die("%s:%i: %s", g_progname, g_lineno, message); |
diff --git a/editors/cmp.c b/editors/cmp.c index b211adf9f..2e98e6e24 100644 --- a/editors/cmp.c +++ b/editors/cmp.c | |||
@@ -33,7 +33,7 @@ static const char opt_chars[] ALIGN1 = "sl"; | |||
33 | #define CMP_OPT_l (1<<1) | 33 | #define CMP_OPT_l (1<<1) |
34 | 34 | ||
35 | int cmp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 35 | int cmp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
36 | int cmp_main(int argc ATTRIBUTE_UNUSED, char **argv) | 36 | int cmp_main(int argc UNUSED_PARAM, char **argv) |
37 | { | 37 | { |
38 | FILE *fp1, *fp2, *outfile = stdout; | 38 | FILE *fp1, *fp2, *outfile = stdout; |
39 | const char *filename1, *filename2 = "-"; | 39 | const char *filename1, *filename2 = "-"; |
diff --git a/editors/diff.c b/editors/diff.c index d7eccfbba..570c4c490 100644 --- a/editors/diff.c +++ b/editors/diff.c | |||
@@ -1164,9 +1164,9 @@ static void do_diff(char *dir1, char *path1, char *dir2, char *path2) | |||
1164 | #if ENABLE_FEATURE_DIFF_DIR | 1164 | #if ENABLE_FEATURE_DIFF_DIR |
1165 | /* This function adds a filename to dl, the directory listing. */ | 1165 | /* This function adds a filename to dl, the directory listing. */ |
1166 | static int FAST_FUNC add_to_dirlist(const char *filename, | 1166 | static int FAST_FUNC add_to_dirlist(const char *filename, |
1167 | struct stat *sb ATTRIBUTE_UNUSED, | 1167 | struct stat *sb UNUSED_PARAM, |
1168 | void *userdata, | 1168 | void *userdata, |
1169 | int depth ATTRIBUTE_UNUSED) | 1169 | int depth UNUSED_PARAM) |
1170 | { | 1170 | { |
1171 | /* +2: with space for eventual trailing NULL */ | 1171 | /* +2: with space for eventual trailing NULL */ |
1172 | dl = xrealloc(dl, (dl_count+2) * sizeof(dl[0])); | 1172 | dl = xrealloc(dl, (dl_count+2) * sizeof(dl[0])); |
@@ -1271,7 +1271,7 @@ static void diffdir(char *p1, char *p2) | |||
1271 | 1271 | ||
1272 | 1272 | ||
1273 | int diff_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 1273 | int diff_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
1274 | int diff_main(int argc ATTRIBUTE_UNUSED, char **argv) | 1274 | int diff_main(int argc UNUSED_PARAM, char **argv) |
1275 | { | 1275 | { |
1276 | int gotstdin = 0; | 1276 | int gotstdin = 0; |
1277 | char *f1, *f2; | 1277 | char *f1, *f2; |
diff --git a/editors/ed.c b/editors/ed.c index 0961cc38e..9084a17fb 100644 --- a/editors/ed.c +++ b/editors/ed.c | |||
@@ -89,7 +89,7 @@ static char *skip_blank(const char *cp) | |||
89 | 89 | ||
90 | 90 | ||
91 | int ed_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 91 | int ed_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
92 | int ed_main(int argc ATTRIBUTE_UNUSED, char **argv) | 92 | int ed_main(int argc UNUSED_PARAM, char **argv) |
93 | { | 93 | { |
94 | INIT_G(); | 94 | INIT_G(); |
95 | 95 | ||
diff --git a/editors/patch.c b/editors/patch.c index 2bc594d16..d5f6df275 100644 --- a/editors/patch.c +++ b/editors/patch.c | |||
@@ -66,7 +66,7 @@ static char *extract_filename(char *line, int patch_level, const char *pat) | |||
66 | } | 66 | } |
67 | 67 | ||
68 | int patch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 68 | int patch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
69 | int patch_main(int argc ATTRIBUTE_UNUSED, char **argv) | 69 | int patch_main(int argc UNUSED_PARAM, char **argv) |
70 | { | 70 | { |
71 | struct stat saved_stat; | 71 | struct stat saved_stat; |
72 | char *patch_line; | 72 | char *patch_line; |
diff --git a/editors/sed.c b/editors/sed.c index 81cc19580..88bae785c 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -1233,7 +1233,7 @@ static void add_cmd_block(char *cmdstr) | |||
1233 | } | 1233 | } |
1234 | 1234 | ||
1235 | int sed_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 1235 | int sed_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
1236 | int sed_main(int argc ATTRIBUTE_UNUSED, char **argv) | 1236 | int sed_main(int argc UNUSED_PARAM, char **argv) |
1237 | { | 1237 | { |
1238 | enum { | 1238 | enum { |
1239 | OPT_in_place = 1 << 0, | 1239 | OPT_in_place = 1 << 0, |
diff --git a/editors/vi.c b/editors/vi.c index 81baa890f..1f1d3ca39 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -2141,7 +2141,7 @@ static void cookmode(void) | |||
2141 | 2141 | ||
2142 | //----- Come here when we get a window resize signal --------- | 2142 | //----- Come here when we get a window resize signal --------- |
2143 | #if ENABLE_FEATURE_VI_USE_SIGNALS | 2143 | #if ENABLE_FEATURE_VI_USE_SIGNALS |
2144 | static void winch_sig(int sig ATTRIBUTE_UNUSED) | 2144 | static void winch_sig(int sig UNUSED_PARAM) |
2145 | { | 2145 | { |
2146 | // FIXME: do it in main loop!!! | 2146 | // FIXME: do it in main loop!!! |
2147 | signal(SIGWINCH, winch_sig); | 2147 | signal(SIGWINCH, winch_sig); |
@@ -2155,7 +2155,7 @@ static void winch_sig(int sig ATTRIBUTE_UNUSED) | |||
2155 | } | 2155 | } |
2156 | 2156 | ||
2157 | //----- Come here when we get a continue signal ------------------- | 2157 | //----- Come here when we get a continue signal ------------------- |
2158 | static void cont_sig(int sig ATTRIBUTE_UNUSED) | 2158 | static void cont_sig(int sig UNUSED_PARAM) |
2159 | { | 2159 | { |
2160 | rawmode(); // terminal to "raw" | 2160 | rawmode(); // terminal to "raw" |
2161 | last_status_cksum = 0; // force status update | 2161 | last_status_cksum = 0; // force status update |
@@ -2167,7 +2167,7 @@ static void cont_sig(int sig ATTRIBUTE_UNUSED) | |||
2167 | } | 2167 | } |
2168 | 2168 | ||
2169 | //----- Come here when we get a Suspend signal ------------------- | 2169 | //----- Come here when we get a Suspend signal ------------------- |
2170 | static void suspend_sig(int sig ATTRIBUTE_UNUSED) | 2170 | static void suspend_sig(int sig UNUSED_PARAM) |
2171 | { | 2171 | { |
2172 | place_cursor(rows - 1, 0, FALSE); // go to bottom of screen | 2172 | place_cursor(rows - 1, 0, FALSE); // go to bottom of screen |
2173 | clear_to_eol(); // Erase to end of line | 2173 | clear_to_eol(); // Erase to end of line |
diff --git a/findutils/find.c b/findutils/find.c index 51d26c00a..f2b89746f 100644 --- a/findutils/find.c +++ b/findutils/find.c | |||
@@ -74,9 +74,9 @@ typedef struct { | |||
74 | #endif | 74 | #endif |
75 | } action; | 75 | } action; |
76 | #define ACTS(name, arg...) typedef struct { action a; arg; } action_##name; | 76 | #define ACTS(name, arg...) typedef struct { action a; arg; } action_##name; |
77 | #define ACTF(name) static int func_##name(const char *fileName ATTRIBUTE_UNUSED, \ | 77 | #define ACTF(name) static int func_##name(const char *fileName UNUSED_PARAM, \ |
78 | struct stat *statbuf ATTRIBUTE_UNUSED, \ | 78 | struct stat *statbuf UNUSED_PARAM, \ |
79 | action_##name* ap ATTRIBUTE_UNUSED) | 79 | action_##name* ap UNUSED_PARAM) |
80 | ACTS(print) | 80 | ACTS(print) |
81 | ACTS(name, const char *pattern; bool iname;) | 81 | ACTS(name, const char *pattern; bool iname;) |
82 | USE_FEATURE_FIND_PATH( ACTS(path, const char *pattern;)) | 82 | USE_FEATURE_FIND_PATH( ACTS(path, const char *pattern;)) |
@@ -376,8 +376,8 @@ ACTF(context) | |||
376 | 376 | ||
377 | static int FAST_FUNC fileAction(const char *fileName, | 377 | static int FAST_FUNC fileAction(const char *fileName, |
378 | struct stat *statbuf, | 378 | struct stat *statbuf, |
379 | void *userData SKIP_FEATURE_FIND_MAXDEPTH(ATTRIBUTE_UNUSED), | 379 | void *userData SKIP_FEATURE_FIND_MAXDEPTH(UNUSED_PARAM), |
380 | int depth SKIP_FEATURE_FIND_MAXDEPTH(ATTRIBUTE_UNUSED)) | 380 | int depth SKIP_FEATURE_FIND_MAXDEPTH(UNUSED_PARAM)) |
381 | { | 381 | { |
382 | int i; | 382 | int i; |
383 | #if ENABLE_FEATURE_FIND_MAXDEPTH | 383 | #if ENABLE_FEATURE_FIND_MAXDEPTH |
diff --git a/findutils/grep.c b/findutils/grep.c index 8d18f43ec..5cfd7721f 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
@@ -371,9 +371,9 @@ static void load_regexes_from_file(llist_t *fopt) | |||
371 | } | 371 | } |
372 | 372 | ||
373 | static int FAST_FUNC file_action_grep(const char *filename, | 373 | static int FAST_FUNC file_action_grep(const char *filename, |
374 | struct stat *statbuf ATTRIBUTE_UNUSED, | 374 | struct stat *statbuf UNUSED_PARAM, |
375 | void* matched, | 375 | void* matched, |
376 | int depth ATTRIBUTE_UNUSED) | 376 | int depth UNUSED_PARAM) |
377 | { | 377 | { |
378 | FILE *file = fopen(filename, "r"); | 378 | FILE *file = fopen(filename, "r"); |
379 | if (file == NULL) { | 379 | if (file == NULL) { |
diff --git a/findutils/xargs.c b/findutils/xargs.c index 3322e9ebd..7a9865b5e 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c | |||
@@ -292,7 +292,7 @@ static int xargs_ask_confirmation(void) | |||
292 | 292 | ||
293 | #if ENABLE_FEATURE_XARGS_SUPPORT_ZERO_TERM | 293 | #if ENABLE_FEATURE_XARGS_SUPPORT_ZERO_TERM |
294 | static xlist_t *process0_stdin(xlist_t *list_arg, | 294 | static xlist_t *process0_stdin(xlist_t *list_arg, |
295 | const char *eof_str ATTRIBUTE_UNUSED, size_t mc, char *buf) | 295 | const char *eof_str UNUSED_PARAM, size_t mc, char *buf) |
296 | { | 296 | { |
297 | int c; /* current char */ | 297 | int c; /* current char */ |
298 | char *s = NULL; /* start word */ | 298 | char *s = NULL; /* start word */ |
diff --git a/include/libbb.h b/include/libbb.h index 54601f87b..378cb4401 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -295,7 +295,7 @@ extern off_t bb_copyfd_size(int fd1, int fd2, off_t size) FAST_FUNC; | |||
295 | extern void bb_copyfd_exact_size(int fd1, int fd2, off_t size) FAST_FUNC; | 295 | extern void bb_copyfd_exact_size(int fd1, int fd2, off_t size) FAST_FUNC; |
296 | /* "short" copy can be detected by return value < size */ | 296 | /* "short" copy can be detected by return value < size */ |
297 | /* this helper yells "short read!" if param is not -1 */ | 297 | /* this helper yells "short read!" if param is not -1 */ |
298 | extern void complain_copyfd_and_die(off_t sz) ATTRIBUTE_NORETURN FAST_FUNC; | 298 | extern void complain_copyfd_and_die(off_t sz) NORETURN FAST_FUNC; |
299 | extern char bb_process_escape_sequence(const char **ptr) FAST_FUNC; | 299 | extern char bb_process_escape_sequence(const char **ptr) FAST_FUNC; |
300 | /* xxxx_strip version can modify its parameter: | 300 | /* xxxx_strip version can modify its parameter: |
301 | * "/" -> "/" | 301 | * "/" -> "/" |
@@ -365,7 +365,7 @@ void signal_no_SA_RESTART_empty_mask(int sig, void (*handler)(int)) FAST_FUNC; | |||
365 | /* syscalls like read() won't be interrupted (though select/poll will be): */ | 365 | /* syscalls like read() won't be interrupted (though select/poll will be): */ |
366 | void signal_SA_RESTART_empty_mask(int sig, void (*handler)(int)) FAST_FUNC; | 366 | void signal_SA_RESTART_empty_mask(int sig, void (*handler)(int)) FAST_FUNC; |
367 | void wait_for_any_sig(void) FAST_FUNC; | 367 | void wait_for_any_sig(void) FAST_FUNC; |
368 | void kill_myself_with_sig(int sig) ATTRIBUTE_NORETURN FAST_FUNC; | 368 | void kill_myself_with_sig(int sig) NORETURN FAST_FUNC; |
369 | void sig_block(int sig) FAST_FUNC; | 369 | void sig_block(int sig) FAST_FUNC; |
370 | void sig_unblock(int sig) FAST_FUNC; | 370 | void sig_unblock(int sig) FAST_FUNC; |
371 | /* Will do sigaction(signum, act, NULL): */ | 371 | /* Will do sigaction(signum, act, NULL): */ |
@@ -611,7 +611,7 @@ extern char *bb_get_chunk_from_file(FILE *file, int *end) FAST_FUNC; | |||
611 | extern void die_if_ferror(FILE *file, const char *msg) FAST_FUNC; | 611 | extern void die_if_ferror(FILE *file, const char *msg) FAST_FUNC; |
612 | extern void die_if_ferror_stdout(void) FAST_FUNC; | 612 | extern void die_if_ferror_stdout(void) FAST_FUNC; |
613 | extern void xfflush_stdout(void) FAST_FUNC; | 613 | extern void xfflush_stdout(void) FAST_FUNC; |
614 | extern void fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN FAST_FUNC; | 614 | extern void fflush_stdout_and_exit(int retval) NORETURN FAST_FUNC; |
615 | extern int fclose_if_not_stdin(FILE *file) FAST_FUNC; | 615 | extern int fclose_if_not_stdin(FILE *file) FAST_FUNC; |
616 | extern FILE *xfopen(const char *filename, const char *mode) FAST_FUNC; | 616 | extern FILE *xfopen(const char *filename, const char *mode) FAST_FUNC; |
617 | /* Prints warning to stderr and returns NULL on failure: */ | 617 | /* Prints warning to stderr and returns NULL on failure: */ |
@@ -789,7 +789,7 @@ enum { | |||
789 | # define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags) | 789 | # define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags) |
790 | # define bb_daemonize(flags) bb_daemonize_or_rexec(flags, bogus) | 790 | # define bb_daemonize(flags) bb_daemonize_or_rexec(flags, bogus) |
791 | #else | 791 | #else |
792 | void re_exec(char **argv) ATTRIBUTE_NORETURN FAST_FUNC; | 792 | void re_exec(char **argv) NORETURN FAST_FUNC; |
793 | void forkexit_or_rexec(char **argv) FAST_FUNC; | 793 | void forkexit_or_rexec(char **argv) FAST_FUNC; |
794 | extern bool re_execed; | 794 | extern bool re_execed; |
795 | int BUG_fork_is_unavailable_on_nommu(void) FAST_FUNC; | 795 | int BUG_fork_is_unavailable_on_nommu(void) FAST_FUNC; |
@@ -855,8 +855,8 @@ extern smallint logmode; | |||
855 | extern int die_sleep; | 855 | extern int die_sleep; |
856 | extern int xfunc_error_retval; | 856 | extern int xfunc_error_retval; |
857 | extern jmp_buf die_jmp; | 857 | extern jmp_buf die_jmp; |
858 | extern void xfunc_die(void) ATTRIBUTE_NORETURN FAST_FUNC; | 858 | extern void xfunc_die(void) NORETURN FAST_FUNC; |
859 | extern void bb_show_usage(void) ATTRIBUTE_NORETURN FAST_FUNC; | 859 | extern void bb_show_usage(void) NORETURN FAST_FUNC; |
860 | extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; | 860 | extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; |
861 | extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; | 861 | extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; |
862 | extern void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; | 862 | extern void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; |
@@ -865,7 +865,7 @@ extern void bb_perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, | |||
865 | extern void bb_simple_perror_msg_and_die(const char *s) __attribute__ ((noreturn)) FAST_FUNC; | 865 | extern void bb_simple_perror_msg_and_die(const char *s) __attribute__ ((noreturn)) FAST_FUNC; |
866 | extern void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; | 866 | extern void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; |
867 | extern void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; | 867 | extern void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; |
868 | extern void bb_perror_nomsg_and_die(void) ATTRIBUTE_NORETURN FAST_FUNC; | 868 | extern void bb_perror_nomsg_and_die(void) NORETURN FAST_FUNC; |
869 | extern void bb_perror_nomsg(void) FAST_FUNC; | 869 | extern void bb_perror_nomsg(void) FAST_FUNC; |
870 | extern void bb_info_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; | 870 | extern void bb_info_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; |
871 | extern void bb_verror_msg(const char *s, va_list p, const char *strerr) FAST_FUNC; | 871 | extern void bb_verror_msg(const char *s, va_list p, const char *strerr) FAST_FUNC; |
@@ -947,7 +947,7 @@ const struct hwtype *get_hwntype(int type) FAST_FUNC; | |||
947 | extern int find_applet_by_name(const char *name) FAST_FUNC; | 947 | extern int find_applet_by_name(const char *name) FAST_FUNC; |
948 | /* Returns only if applet is not found. */ | 948 | /* Returns only if applet is not found. */ |
949 | extern void run_applet_and_exit(const char *name, char **argv) FAST_FUNC; | 949 | extern void run_applet_and_exit(const char *name, char **argv) FAST_FUNC; |
950 | extern void run_applet_no_and_exit(int a, char **argv) ATTRIBUTE_NORETURN FAST_FUNC; | 950 | extern void run_applet_no_and_exit(int a, char **argv) NORETURN FAST_FUNC; |
951 | #endif | 951 | #endif |
952 | 952 | ||
953 | #ifdef HAVE_MNTENT_H | 953 | #ifdef HAVE_MNTENT_H |
@@ -1001,7 +1001,7 @@ char *bb_simplify_path(const char *path) FAST_FUNC; | |||
1001 | #define FAIL_DELAY 3 | 1001 | #define FAIL_DELAY 3 |
1002 | extern void bb_do_delay(int seconds) FAST_FUNC; | 1002 | extern void bb_do_delay(int seconds) FAST_FUNC; |
1003 | extern void change_identity(const struct passwd *pw) FAST_FUNC; | 1003 | extern void change_identity(const struct passwd *pw) FAST_FUNC; |
1004 | extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) ATTRIBUTE_NORETURN FAST_FUNC; | 1004 | extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) NORETURN FAST_FUNC; |
1005 | extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) FAST_FUNC; | 1005 | extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) FAST_FUNC; |
1006 | #if ENABLE_SELINUX | 1006 | #if ENABLE_SELINUX |
1007 | extern void renew_current_security_context(void) FAST_FUNC; | 1007 | extern void renew_current_security_context(void) FAST_FUNC; |
diff --git a/include/platform.h b/include/platform.h index 12cb4d5a7..d2c1f9d20 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -48,27 +48,27 @@ | |||
48 | # define __const const | 48 | # define __const const |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | #define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) | 51 | #define UNUSED_PARAM __attribute__ ((__unused__)) |
52 | #define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) | 52 | #define NORETURN __attribute__ ((__noreturn__)) |
53 | #define ATTRIBUTE_PACKED __attribute__ ((__packed__)) | 53 | #define PACKED __attribute__ ((__packed__)) |
54 | #define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m))) | 54 | #define ALIGNED(m) __attribute__ ((__aligned__(m))) |
55 | /* __NO_INLINE__: some gcc's do not honor inlining! :( */ | 55 | /* __NO_INLINE__: some gcc's do not honor inlining! :( */ |
56 | #if __GNUC_PREREQ(3,0) && !defined(__NO_INLINE__) | 56 | #if __GNUC_PREREQ(3,0) && !defined(__NO_INLINE__) |
57 | # define ALWAYS_INLINE __attribute__ ((always_inline)) inline | 57 | # define ALWAYS_INLINE __attribute__ ((always_inline)) inline |
58 | /* I've seen a toolchain where I needed __noinline__ instead of noinline */ | 58 | /* I've seen a toolchain where I needed __noinline__ instead of noinline */ |
59 | # define NOINLINE __attribute__((__noinline__)) | 59 | # define NOINLINE __attribute__((__noinline__)) |
60 | # if !ENABLE_WERROR | 60 | # if !ENABLE_WERROR |
61 | # define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) | 61 | # define DEPRECATED __attribute__ ((__deprecated__)) |
62 | # define ATTRIBUTE_UNUSED_RESULT __attribute__ ((warn_unused_result)) | 62 | # define UNUSED_PARAM_RESULT __attribute__ ((warn_unused_result)) |
63 | # else | 63 | # else |
64 | # define ATTRIBUTE_DEPRECATED /* n/a */ | 64 | # define DEPRECATED /* n/a */ |
65 | # define ATTRIBUTE_UNUSED_RESULT /* n/a */ | 65 | # define UNUSED_PARAM_RESULT /* n/a */ |
66 | # endif | 66 | # endif |
67 | #else | 67 | #else |
68 | # define ALWAYS_INLINE inline /* n/a */ | 68 | # define ALWAYS_INLINE inline /* n/a */ |
69 | # define NOINLINE /* n/a */ | 69 | # define NOINLINE /* n/a */ |
70 | # define ATTRIBUTE_DEPRECATED /* n/a */ | 70 | # define DEPRECATED /* n/a */ |
71 | # define ATTRIBUTE_UNUSED_RESULT /* n/a */ | 71 | # define UNUSED_PARAM_RESULT /* n/a */ |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | /* -fwhole-program makes all symbols local. The attribute externally_visible | 74 | /* -fwhole-program makes all symbols local. The attribute externally_visible |
diff --git a/init/halt.c b/init/halt.c index 4fac3a86b..207069e12 100644 --- a/init/halt.c +++ b/init/halt.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | int halt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 18 | int halt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
19 | int halt_main(int argc ATTRIBUTE_UNUSED, char **argv) | 19 | int halt_main(int argc UNUSED_PARAM, char **argv) |
20 | { | 20 | { |
21 | static const int magic[] = { | 21 | static const int magic[] = { |
22 | #ifdef RB_HALT_SYSTEM | 22 | #ifdef RB_HALT_SYSTEM |
diff --git a/init/init.c b/init/init.c index e3993896d..232896709 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -96,7 +96,7 @@ static const char *const environment[] = { | |||
96 | 96 | ||
97 | /* Function prototypes */ | 97 | /* Function prototypes */ |
98 | static void delete_init_action(struct init_action *a); | 98 | static void delete_init_action(struct init_action *a); |
99 | static void halt_reboot_pwoff(int sig) ATTRIBUTE_NORETURN; | 99 | static void halt_reboot_pwoff(int sig) NORETURN; |
100 | 100 | ||
101 | static void waitfor(pid_t pid) | 101 | static void waitfor(pid_t pid) |
102 | { | 102 | { |
@@ -110,7 +110,7 @@ static void waitfor(pid_t pid) | |||
110 | continue; | 110 | continue; |
111 | } | 111 | } |
112 | 112 | ||
113 | static void loop_forever(void) ATTRIBUTE_NORETURN; | 113 | static void loop_forever(void) NORETURN; |
114 | static void loop_forever(void) | 114 | static void loop_forever(void) |
115 | { | 115 | { |
116 | while (1) | 116 | while (1) |
@@ -594,7 +594,7 @@ static void halt_reboot_pwoff(int sig) | |||
594 | 594 | ||
595 | /* Handler for QUIT - exec "restart" action, | 595 | /* Handler for QUIT - exec "restart" action, |
596 | * else (no such action defined) do nothing */ | 596 | * else (no such action defined) do nothing */ |
597 | static void exec_restart_action(int sig ATTRIBUTE_UNUSED) | 597 | static void exec_restart_action(int sig UNUSED_PARAM) |
598 | { | 598 | { |
599 | struct init_action *a; | 599 | struct init_action *a; |
600 | 600 | ||
@@ -617,13 +617,13 @@ static void exec_restart_action(int sig ATTRIBUTE_UNUSED) | |||
617 | } | 617 | } |
618 | } | 618 | } |
619 | 619 | ||
620 | static void ctrlaltdel_signal(int sig ATTRIBUTE_UNUSED) | 620 | static void ctrlaltdel_signal(int sig UNUSED_PARAM) |
621 | { | 621 | { |
622 | run_actions(CTRLALTDEL); | 622 | run_actions(CTRLALTDEL); |
623 | } | 623 | } |
624 | 624 | ||
625 | /* The SIGSTOP & SIGTSTP handler */ | 625 | /* The SIGSTOP & SIGTSTP handler */ |
626 | static void stop_handler(int sig ATTRIBUTE_UNUSED) | 626 | static void stop_handler(int sig UNUSED_PARAM) |
627 | { | 627 | { |
628 | int saved_errno = errno; | 628 | int saved_errno = errno; |
629 | 629 | ||
@@ -635,7 +635,7 @@ static void stop_handler(int sig ATTRIBUTE_UNUSED) | |||
635 | } | 635 | } |
636 | 636 | ||
637 | /* The SIGCONT handler */ | 637 | /* The SIGCONT handler */ |
638 | static void cont_handler(int sig ATTRIBUTE_UNUSED) | 638 | static void cont_handler(int sig UNUSED_PARAM) |
639 | { | 639 | { |
640 | got_cont = 1; | 640 | got_cont = 1; |
641 | } | 641 | } |
@@ -790,7 +790,7 @@ static void parse_inittab(void) | |||
790 | } | 790 | } |
791 | 791 | ||
792 | #if ENABLE_FEATURE_USE_INITTAB | 792 | #if ENABLE_FEATURE_USE_INITTAB |
793 | static void reload_signal(int sig ATTRIBUTE_UNUSED) | 793 | static void reload_signal(int sig UNUSED_PARAM) |
794 | { | 794 | { |
795 | struct init_action *a, *tmp; | 795 | struct init_action *a, *tmp; |
796 | 796 | ||
@@ -838,7 +838,7 @@ static void reload_signal(int sig ATTRIBUTE_UNUSED) | |||
838 | #endif | 838 | #endif |
839 | 839 | ||
840 | int init_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 840 | int init_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
841 | int init_main(int argc ATTRIBUTE_UNUSED, char **argv) | 841 | int init_main(int argc UNUSED_PARAM, char **argv) |
842 | { | 842 | { |
843 | struct init_action *a; | 843 | struct init_action *a; |
844 | pid_t wpid; | 844 | pid_t wpid; |
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 0017a4bef..eb98f1cd2 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
@@ -738,7 +738,7 @@ void FAST_FUNC run_applet_and_exit(const char *name, char **argv) | |||
738 | #if ENABLE_BUILD_LIBBUSYBOX | 738 | #if ENABLE_BUILD_LIBBUSYBOX |
739 | int lbb_main(char **argv) | 739 | int lbb_main(char **argv) |
740 | #else | 740 | #else |
741 | int main(int argc ATTRIBUTE_UNUSED, char **argv) | 741 | int main(int argc UNUSED_PARAM, char **argv) |
742 | #endif | 742 | #endif |
743 | { | 743 | { |
744 | #if defined(SINGLE_APPLET_MAIN) | 744 | #if defined(SINGLE_APPLET_MAIN) |
diff --git a/libbb/bb_askpass.c b/libbb/bb_askpass.c index ca18aded9..fba82a07b 100644 --- a/libbb/bb_askpass.c +++ b/libbb/bb_askpass.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "libbb.h" | 13 | #include "libbb.h" |
14 | 14 | ||
15 | /* do nothing signal handler */ | 15 | /* do nothing signal handler */ |
16 | static void askpass_timeout(int ATTRIBUTE_UNUSED ignore) | 16 | static void askpass_timeout(int UNUSED_PARAM ignore) |
17 | { | 17 | { |
18 | } | 18 | } |
19 | 19 | ||
diff --git a/libbb/messages.c b/libbb/messages.c index 74a070c49..90090283c 100644 --- a/libbb/messages.c +++ b/libbb/messages.c | |||
@@ -70,4 +70,4 @@ const char bb_path_wtmp_file[] ALIGN1 = | |||
70 | /* We use it for "global" data via *(struct global*)&bb_common_bufsiz1. | 70 | /* We use it for "global" data via *(struct global*)&bb_common_bufsiz1. |
71 | * Since gcc insists on aligning struct global's members, it would be a pity | 71 | * Since gcc insists on aligning struct global's members, it would be a pity |
72 | * (and an alignment fault on some CPUs) to mess it up. */ | 72 | * (and an alignment fault on some CPUs) to mess it up. */ |
73 | char bb_common_bufsiz1[COMMON_BUFSIZE] __attribute__(( aligned(sizeof(long long)) )); | 73 | char bb_common_bufsiz1[COMMON_BUFSIZE] ALIGNED(sizeof(long long)); |
diff --git a/libbb/recursive_action.c b/libbb/recursive_action.c index dbc31c3b6..07bd0abfd 100644 --- a/libbb/recursive_action.c +++ b/libbb/recursive_action.c | |||
@@ -22,10 +22,10 @@ | |||
22 | * is so stinking huge. | 22 | * is so stinking huge. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | static int FAST_FUNC true_action(const char *fileName ATTRIBUTE_UNUSED, | 25 | static int FAST_FUNC true_action(const char *fileName UNUSED_PARAM, |
26 | struct stat *statbuf ATTRIBUTE_UNUSED, | 26 | struct stat *statbuf UNUSED_PARAM, |
27 | void* userData ATTRIBUTE_UNUSED, | 27 | void* userData UNUSED_PARAM, |
28 | int depth ATTRIBUTE_UNUSED) | 28 | int depth UNUSED_PARAM) |
29 | { | 29 | { |
30 | return TRUE; | 30 | return TRUE; |
31 | } | 31 | } |
diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c index 863ccdf72..89414d738 100644 --- a/loginutils/addgroup.c +++ b/loginutils/addgroup.c | |||
@@ -123,7 +123,7 @@ static void add_user_to_group(char **args, | |||
123 | * will add an existing user to an existing group. | 123 | * will add an existing user to an existing group. |
124 | */ | 124 | */ |
125 | int addgroup_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 125 | int addgroup_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
126 | int addgroup_main(int argc ATTRIBUTE_UNUSED, char **argv) | 126 | int addgroup_main(int argc UNUSED_PARAM, char **argv) |
127 | { | 127 | { |
128 | char *group; | 128 | char *group; |
129 | gid_t gid = 0; | 129 | gid_t gid = 0; |
diff --git a/loginutils/adduser.c b/loginutils/adduser.c index cd68015d1..3154806b6 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c | |||
@@ -56,7 +56,7 @@ static void addgroup_wrapper(struct passwd *p) | |||
56 | free(cmd); | 56 | free(cmd); |
57 | } | 57 | } |
58 | 58 | ||
59 | static void passwd_wrapper(const char *login) ATTRIBUTE_NORETURN; | 59 | static void passwd_wrapper(const char *login) NORETURN; |
60 | 60 | ||
61 | static void passwd_wrapper(const char *login) | 61 | static void passwd_wrapper(const char *login) |
62 | { | 62 | { |
@@ -85,7 +85,7 @@ static const char adduser_longopts[] ALIGN1 = | |||
85 | * can be customized via command-line parameters. | 85 | * can be customized via command-line parameters. |
86 | */ | 86 | */ |
87 | int adduser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 87 | int adduser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
88 | int adduser_main(int argc ATTRIBUTE_UNUSED, char **argv) | 88 | int adduser_main(int argc UNUSED_PARAM, char **argv) |
89 | { | 89 | { |
90 | struct passwd pw; | 90 | struct passwd pw; |
91 | const char *usegroup = NULL; | 91 | const char *usegroup = NULL; |
diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c index 7308596ad..25145fd1c 100644 --- a/loginutils/chpasswd.c +++ b/loginutils/chpasswd.c | |||
@@ -19,7 +19,7 @@ static const char chpasswd_longopts[] ALIGN1 = | |||
19 | #define OPT_MD5 2 | 19 | #define OPT_MD5 2 |
20 | 20 | ||
21 | int chpasswd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 21 | int chpasswd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
22 | int chpasswd_main(int argc ATTRIBUTE_UNUSED, char **argv) | 22 | int chpasswd_main(int argc UNUSED_PARAM, char **argv) |
23 | { | 23 | { |
24 | char *name, *pass; | 24 | char *name, *pass; |
25 | char salt[sizeof("$N$XXXXXXXX")]; | 25 | char salt[sizeof("$N$XXXXXXXX")]; |
diff --git a/loginutils/cryptpw.c b/loginutils/cryptpw.c index 901f6fcde..db5d95920 100644 --- a/loginutils/cryptpw.c +++ b/loginutils/cryptpw.c | |||
@@ -32,7 +32,7 @@ done | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | int cryptpw_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 34 | int cryptpw_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
35 | int cryptpw_main(int argc ATTRIBUTE_UNUSED, char **argv) | 35 | int cryptpw_main(int argc UNUSED_PARAM, char **argv) |
36 | { | 36 | { |
37 | char salt[sizeof("$N$XXXXXXXX")]; | 37 | char salt[sizeof("$N$XXXXXXXX")]; |
38 | char *opt_a; | 38 | char *opt_a; |
diff --git a/loginutils/getty.c b/loginutils/getty.c index 13a8c0c6c..7d4fe4df9 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c | |||
@@ -620,7 +620,7 @@ static void update_utmp(const char *line, char *fakehost) | |||
620 | #endif /* CONFIG_FEATURE_UTMP */ | 620 | #endif /* CONFIG_FEATURE_UTMP */ |
621 | 621 | ||
622 | int getty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 622 | int getty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
623 | int getty_main(int argc ATTRIBUTE_UNUSED, char **argv) | 623 | int getty_main(int argc UNUSED_PARAM, char **argv) |
624 | { | 624 | { |
625 | int n; | 625 | int n; |
626 | char *fakehost = NULL; /* Fake hostname for ut_host */ | 626 | char *fakehost = NULL; /* Fake hostname for ut_host */ |
diff --git a/loginutils/login.c b/loginutils/login.c index d9a2f8a41..9c7941e0d 100644 --- a/loginutils/login.c +++ b/loginutils/login.c | |||
@@ -206,7 +206,7 @@ static void motd(void) | |||
206 | } | 206 | } |
207 | } | 207 | } |
208 | 208 | ||
209 | static void alarm_handler(int sig ATTRIBUTE_UNUSED) | 209 | static void alarm_handler(int sig UNUSED_PARAM) |
210 | { | 210 | { |
211 | /* This is the escape hatch! Poor serial line users and the like | 211 | /* This is the escape hatch! Poor serial line users and the like |
212 | * arrive here when their connection is broken. | 212 | * arrive here when their connection is broken. |
@@ -221,7 +221,7 @@ static void alarm_handler(int sig ATTRIBUTE_UNUSED) | |||
221 | } | 221 | } |
222 | 222 | ||
223 | int login_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 223 | int login_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
224 | int login_main(int argc ATTRIBUTE_UNUSED, char **argv) | 224 | int login_main(int argc UNUSED_PARAM, char **argv) |
225 | { | 225 | { |
226 | enum { | 226 | enum { |
227 | LOGIN_OPT_f = (1<<0), | 227 | LOGIN_OPT_f = (1<<0), |
diff --git a/loginutils/passwd.c b/loginutils/passwd.c index 0a31137cf..84e5aeb6d 100644 --- a/loginutils/passwd.c +++ b/loginutils/passwd.c | |||
@@ -71,7 +71,7 @@ static char* new_password(const struct passwd *pw, uid_t myuid, int algo) | |||
71 | } | 71 | } |
72 | 72 | ||
73 | int passwd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 73 | int passwd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
74 | int passwd_main(int argc ATTRIBUTE_UNUSED, char **argv) | 74 | int passwd_main(int argc UNUSED_PARAM, char **argv) |
75 | { | 75 | { |
76 | enum { | 76 | enum { |
77 | OPT_algo = 0x1, /* -a - password algorithm */ | 77 | OPT_algo = 0x1, /* -a - password algorithm */ |
diff --git a/loginutils/su.c b/loginutils/su.c index 1a35f0e4f..61039d823 100644 --- a/loginutils/su.c +++ b/loginutils/su.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #define SU_OPT_l (4) | 12 | #define SU_OPT_l (4) |
13 | 13 | ||
14 | int su_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 14 | int su_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
15 | int su_main(int argc ATTRIBUTE_UNUSED, char **argv) | 15 | int su_main(int argc UNUSED_PARAM, char **argv) |
16 | { | 16 | { |
17 | unsigned flags; | 17 | unsigned flags; |
18 | char *opt_shell = NULL; | 18 | char *opt_shell = NULL; |
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index 38812a6cc..bfd42569a 100644 --- a/loginutils/sulogin.c +++ b/loginutils/sulogin.c | |||
@@ -8,14 +8,14 @@ | |||
8 | #include "libbb.h" | 8 | #include "libbb.h" |
9 | #include <syslog.h> | 9 | #include <syslog.h> |
10 | 10 | ||
11 | //static void catchalarm(int ATTRIBUTE_UNUSED junk) | 11 | //static void catchalarm(int UNUSED_PARAM junk) |
12 | //{ | 12 | //{ |
13 | // exit(EXIT_FAILURE); | 13 | // exit(EXIT_FAILURE); |
14 | //} | 14 | //} |
15 | 15 | ||
16 | 16 | ||
17 | int sulogin_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 17 | int sulogin_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
18 | int sulogin_main(int argc ATTRIBUTE_UNUSED, char **argv) | 18 | int sulogin_main(int argc UNUSED_PARAM, char **argv) |
19 | { | 19 | { |
20 | char *cp; | 20 | char *cp; |
21 | int timeout = 0; | 21 | int timeout = 0; |
diff --git a/loginutils/vlock.c b/loginutils/vlock.c index 3ce40dd62..442272a05 100644 --- a/loginutils/vlock.c +++ b/loginutils/vlock.c | |||
@@ -18,21 +18,21 @@ | |||
18 | #include <sys/vt.h> | 18 | #include <sys/vt.h> |
19 | #include "libbb.h" | 19 | #include "libbb.h" |
20 | 20 | ||
21 | static void release_vt(int signo ATTRIBUTE_UNUSED) | 21 | static void release_vt(int signo UNUSED_PARAM) |
22 | { | 22 | { |
23 | /* If -a, param is 0, which means: | 23 | /* If -a, param is 0, which means: |
24 | * "no, kernel, we don't allow console switch away from us!" */ | 24 | * "no, kernel, we don't allow console switch away from us!" */ |
25 | ioctl(STDIN_FILENO, VT_RELDISP, (unsigned long) !option_mask32); | 25 | ioctl(STDIN_FILENO, VT_RELDISP, (unsigned long) !option_mask32); |
26 | } | 26 | } |
27 | 27 | ||
28 | static void acquire_vt(int signo ATTRIBUTE_UNUSED) | 28 | static void acquire_vt(int signo UNUSED_PARAM) |
29 | { | 29 | { |
30 | /* ACK to kernel that switch to console is successful */ | 30 | /* ACK to kernel that switch to console is successful */ |
31 | ioctl(STDIN_FILENO, VT_RELDISP, VT_ACKACQ); | 31 | ioctl(STDIN_FILENO, VT_RELDISP, VT_ACKACQ); |
32 | } | 32 | } |
33 | 33 | ||
34 | int vlock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 34 | int vlock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
35 | int vlock_main(int argc ATTRIBUTE_UNUSED, char **argv) | 35 | int vlock_main(int argc UNUSED_PARAM, char **argv) |
36 | { | 36 | { |
37 | struct vt_mode vtm; | 37 | struct vt_mode vtm; |
38 | struct termios term; | 38 | struct termios term; |
diff --git a/miscutils/bbconfig.c b/miscutils/bbconfig.c index f3aef42e3..689052e86 100644 --- a/miscutils/bbconfig.c +++ b/miscutils/bbconfig.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include "bbconfigopts.h" | 5 | #include "bbconfigopts.h" |
6 | 6 | ||
7 | int bbconfig_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 7 | int bbconfig_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
8 | int bbconfig_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 8 | int bbconfig_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
9 | { | 9 | { |
10 | printf(bbconfig_config); | 10 | printf(bbconfig_config); |
11 | return 0; | 11 | return 0; |
diff --git a/miscutils/chat.c b/miscutils/chat.c index 5bbbb688f..d550c7c90 100644 --- a/miscutils/chat.c +++ b/miscutils/chat.c | |||
@@ -41,7 +41,7 @@ enum { | |||
41 | static /*volatile*/ smallint exitcode; | 41 | static /*volatile*/ smallint exitcode; |
42 | 42 | ||
43 | // trap for critical signals | 43 | // trap for critical signals |
44 | static void signal_handler(ATTRIBUTE_UNUSED int signo) | 44 | static void signal_handler(UNUSED_PARAM int signo) |
45 | { | 45 | { |
46 | // report I/O error condition | 46 | // report I/O error condition |
47 | exitcode = ERR_IO; | 47 | exitcode = ERR_IO; |
@@ -103,7 +103,7 @@ static size_t unescape(char *s, int *nocr) | |||
103 | 103 | ||
104 | 104 | ||
105 | int chat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 105 | int chat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
106 | int chat_main(int argc ATTRIBUTE_UNUSED, char **argv) | 106 | int chat_main(int argc UNUSED_PARAM, char **argv) |
107 | { | 107 | { |
108 | // should we dump device output? to what fd? by default no. | 108 | // should we dump device output? to what fd? by default no. |
109 | // this can be controlled later via ECHO {ON|OFF} chat directive | 109 | // this can be controlled later via ECHO {ON|OFF} chat directive |
diff --git a/miscutils/chrt.c b/miscutils/chrt.c index a0f684bb3..23ef58c4d 100644 --- a/miscutils/chrt.c +++ b/miscutils/chrt.c | |||
@@ -41,7 +41,7 @@ static void show_min_max(int pol) | |||
41 | #define OPT_o (1<<4) | 41 | #define OPT_o (1<<4) |
42 | 42 | ||
43 | int chrt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 43 | int chrt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
44 | int chrt_main(int argc ATTRIBUTE_UNUSED, char **argv) | 44 | int chrt_main(int argc UNUSED_PARAM, char **argv) |
45 | { | 45 | { |
46 | pid_t pid = 0; | 46 | pid_t pid = 0; |
47 | unsigned opt; | 47 | unsigned opt; |
diff --git a/miscutils/crond.c b/miscutils/crond.c index ecb3a2f80..e48abf9f8 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c | |||
@@ -159,7 +159,7 @@ static void crondlog(const char *ctl, ...) | |||
159 | } | 159 | } |
160 | 160 | ||
161 | int crond_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 161 | int crond_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
162 | int crond_main(int argc ATTRIBUTE_UNUSED, char **argv) | 162 | int crond_main(int argc UNUSED_PARAM, char **argv) |
163 | { | 163 | { |
164 | unsigned opt; | 164 | unsigned opt; |
165 | 165 | ||
diff --git a/miscutils/crontab.c b/miscutils/crontab.c index dc3179dac..64ea4e616 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c | |||
@@ -85,7 +85,7 @@ static int open_as_user(const struct passwd *pas, const char *file) | |||
85 | } | 85 | } |
86 | 86 | ||
87 | int crontab_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 87 | int crontab_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
88 | int crontab_main(int argc ATTRIBUTE_UNUSED, char **argv) | 88 | int crontab_main(int argc UNUSED_PARAM, char **argv) |
89 | { | 89 | { |
90 | const struct passwd *pas; | 90 | const struct passwd *pas; |
91 | const char *crontab_dir = CRONTABS; | 91 | const char *crontab_dir = CRONTABS; |
diff --git a/miscutils/dc.c b/miscutils/dc.c index bd93ef68b..47ec060c8 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c | |||
@@ -193,7 +193,7 @@ static char *get_token(char **buffer) | |||
193 | } | 193 | } |
194 | 194 | ||
195 | int dc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 195 | int dc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
196 | int dc_main(int argc ATTRIBUTE_UNUSED, char **argv) | 196 | int dc_main(int argc UNUSED_PARAM, char **argv) |
197 | { | 197 | { |
198 | INIT_G(); | 198 | INIT_G(); |
199 | 199 | ||
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index ffc595ac9..c85ff08f3 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
@@ -741,7 +741,7 @@ static void action_permissions(const struct devfsd_notify_struct *info, | |||
741 | } /* End Function action_permissions */ | 741 | } /* End Function action_permissions */ |
742 | 742 | ||
743 | static void action_modload(const struct devfsd_notify_struct *info, | 743 | static void action_modload(const struct devfsd_notify_struct *info, |
744 | const struct config_entry_struct *entry ATTRIBUTE_UNUSED) | 744 | const struct config_entry_struct *entry UNUSED_PARAM) |
745 | /* [SUMMARY] Load a module. | 745 | /* [SUMMARY] Load a module. |
746 | <info> The devfs change. | 746 | <info> The devfs change. |
747 | <entry> The config file entry. | 747 | <entry> The config file entry. |
diff --git a/miscutils/eject.c b/miscutils/eject.c index aa22a3a42..ff3976ebb 100644 --- a/miscutils/eject.c +++ b/miscutils/eject.c | |||
@@ -83,7 +83,7 @@ static void eject_cdrom(unsigned flags, const char *dev) | |||
83 | } | 83 | } |
84 | 84 | ||
85 | int eject_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 85 | int eject_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
86 | int eject_main(int argc ATTRIBUTE_UNUSED, char **argv) | 86 | int eject_main(int argc UNUSED_PARAM, char **argv) |
87 | { | 87 | { |
88 | unsigned flags; | 88 | unsigned flags; |
89 | const char *device; | 89 | const char *device; |
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c index 07350b0cc..67847c1eb 100644 --- a/miscutils/fbsplash.c +++ b/miscutils/fbsplash.c | |||
@@ -355,7 +355,7 @@ static void init(const char *cfg_filename) | |||
355 | 355 | ||
356 | 356 | ||
357 | int fbsplash_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 357 | int fbsplash_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
358 | int fbsplash_main(int argc ATTRIBUTE_UNUSED, char **argv) | 358 | int fbsplash_main(int argc UNUSED_PARAM, char **argv) |
359 | { | 359 | { |
360 | const char *fb_device, *cfg_filename, *fifo_filename; | 360 | const char *fb_device, *cfg_filename, *fifo_filename; |
361 | FILE *fp = fp; // for compiler | 361 | FILE *fp = fp; // for compiler |
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index a5d5b05cd..b75da16ec 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c | |||
@@ -678,7 +678,7 @@ static const char secu_str[] ALIGN1 = | |||
678 | ; | 678 | ; |
679 | 679 | ||
680 | // Parse 512 byte disk identification block and print much crap. | 680 | // Parse 512 byte disk identification block and print much crap. |
681 | static void identify(uint16_t *val) ATTRIBUTE_NORETURN; | 681 | static void identify(uint16_t *val) NORETURN; |
682 | static void identify(uint16_t *val) | 682 | static void identify(uint16_t *val) |
683 | { | 683 | { |
684 | uint16_t ii, jj, kk; | 684 | uint16_t ii, jj, kk; |
@@ -1908,7 +1908,7 @@ static int fromhex(unsigned char c) | |||
1908 | bb_error_msg_and_die("bad char: '%c' 0x%02x", c, c); | 1908 | bb_error_msg_and_die("bad char: '%c' 0x%02x", c, c); |
1909 | } | 1909 | } |
1910 | 1910 | ||
1911 | static void identify_from_stdin(void) ATTRIBUTE_NORETURN; | 1911 | static void identify_from_stdin(void) NORETURN; |
1912 | static void identify_from_stdin(void) | 1912 | static void identify_from_stdin(void) |
1913 | { | 1913 | { |
1914 | uint16_t sbuf[256]; | 1914 | uint16_t sbuf[256]; |
diff --git a/miscutils/inotifyd.c b/miscutils/inotifyd.c index 0d7ad2a9d..2a1a15348 100644 --- a/miscutils/inotifyd.c +++ b/miscutils/inotifyd.c | |||
@@ -56,7 +56,7 @@ extern int inotify_init(void); | |||
56 | extern int inotify_add_watch(int fd, const char *path, uint32_t mask); | 56 | extern int inotify_add_watch(int fd, const char *path, uint32_t mask); |
57 | 57 | ||
58 | int inotifyd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 58 | int inotifyd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
59 | int inotifyd_main(int argc ATTRIBUTE_UNUSED, char **argv) | 59 | int inotifyd_main(int argc UNUSED_PARAM, char **argv) |
60 | { | 60 | { |
61 | unsigned mask = IN_ALL_EVENTS; // assume we want all events | 61 | unsigned mask = IN_ALL_EVENTS; // assume we want all events |
62 | struct pollfd pfd; | 62 | struct pollfd pfd; |
diff --git a/miscutils/last.c b/miscutils/last.c index 612f50488..8c8192bee 100644 --- a/miscutils/last.c +++ b/miscutils/last.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | int last_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 37 | int last_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
38 | int last_main(int argc, char **argv ATTRIBUTE_UNUSED) | 38 | int last_main(int argc, char **argv UNUSED_PARAM) |
39 | { | 39 | { |
40 | struct utmp ut; | 40 | struct utmp ut; |
41 | int n, file = STDIN_FILENO; | 41 | int n, file = STDIN_FILENO; |
diff --git a/miscutils/last_fancy.c b/miscutils/last_fancy.c index 2b7fee6e5..8e63e5c3d 100644 --- a/miscutils/last_fancy.c +++ b/miscutils/last_fancy.c | |||
@@ -148,7 +148,7 @@ static int is_runlevel_shutdown(struct utmp *ut) | |||
148 | } | 148 | } |
149 | 149 | ||
150 | int last_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 150 | int last_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
151 | int last_main(int argc ATTRIBUTE_UNUSED, char **argv) | 151 | int last_main(int argc UNUSED_PARAM, char **argv) |
152 | { | 152 | { |
153 | struct utmp ut; | 153 | struct utmp ut; |
154 | const char *filename = _PATH_WTMP; | 154 | const char *filename = _PATH_WTMP; |
diff --git a/miscutils/man.c b/miscutils/man.c index 95cb6797b..3685be7b6 100644 --- a/miscutils/man.c +++ b/miscutils/man.c | |||
@@ -73,7 +73,7 @@ static int show_manpage(const char *pager, char *man_filename, int man) | |||
73 | } | 73 | } |
74 | 74 | ||
75 | int man_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 75 | int man_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
76 | int man_main(int argc ATTRIBUTE_UNUSED, char **argv) | 76 | int man_main(int argc UNUSED_PARAM, char **argv) |
77 | { | 77 | { |
78 | FILE *cf; | 78 | FILE *cf; |
79 | const char *pager; | 79 | const char *pager; |
diff --git a/miscutils/microcom.c b/miscutils/microcom.c index 1608960e9..ac3e5514f 100644 --- a/miscutils/microcom.c +++ b/miscutils/microcom.c | |||
@@ -41,7 +41,7 @@ static int xset1(int fd, struct termios *tio, const char *device) | |||
41 | } | 41 | } |
42 | 42 | ||
43 | int microcom_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 43 | int microcom_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
44 | int microcom_main(int argc ATTRIBUTE_UNUSED, char **argv) | 44 | int microcom_main(int argc UNUSED_PARAM, char **argv) |
45 | { | 45 | { |
46 | int sfd; | 46 | int sfd; |
47 | int nfd; | 47 | int nfd; |
diff --git a/miscutils/mt.c b/miscutils/mt.c index c56a8e0ca..586373d13 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c | |||
@@ -81,7 +81,7 @@ static const char opcode_name[] ALIGN1 = | |||
81 | "weof" "\0"; | 81 | "weof" "\0"; |
82 | 82 | ||
83 | int mt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 83 | int mt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
84 | int mt_main(int argc ATTRIBUTE_UNUSED, char **argv) | 84 | int mt_main(int argc UNUSED_PARAM, char **argv) |
85 | { | 85 | { |
86 | const char *file = "/dev/tape"; | 86 | const char *file = "/dev/tape"; |
87 | struct mtop op; | 87 | struct mtop op; |
diff --git a/miscutils/rx.c b/miscutils/rx.c index 48867b83c..94eb4522d 100644 --- a/miscutils/rx.c +++ b/miscutils/rx.c | |||
@@ -213,7 +213,7 @@ static int receive(/*int read_fd, */int file_fd) | |||
213 | } /* for (;;) */ | 213 | } /* for (;;) */ |
214 | } | 214 | } |
215 | 215 | ||
216 | static void sigalrm_handler(int ATTRIBUTE_UNUSED signum) | 216 | static void sigalrm_handler(int UNUSED_PARAM signum) |
217 | { | 217 | { |
218 | } | 218 | } |
219 | 219 | ||
diff --git a/miscutils/setsid.c b/miscutils/setsid.c index 014de51e5..127adf6f2 100644 --- a/miscutils/setsid.c +++ b/miscutils/setsid.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include "libbb.h" | 17 | #include "libbb.h" |
18 | 18 | ||
19 | int setsid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 19 | int setsid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
20 | int setsid_main(int argc ATTRIBUTE_UNUSED, char **argv) | 20 | int setsid_main(int argc UNUSED_PARAM, char **argv) |
21 | { | 21 | { |
22 | if (!argv[1]) | 22 | if (!argv[1]) |
23 | bb_show_usage(); | 23 | bb_show_usage(); |
diff --git a/miscutils/strings.c b/miscutils/strings.c index 147413741..3e02b53af 100644 --- a/miscutils/strings.c +++ b/miscutils/strings.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #define SIZE 8 | 15 | #define SIZE 8 |
16 | 16 | ||
17 | int strings_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 17 | int strings_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
18 | int strings_main(int argc ATTRIBUTE_UNUSED, char **argv) | 18 | int strings_main(int argc UNUSED_PARAM, char **argv) |
19 | { | 19 | { |
20 | int n, c, status = EXIT_SUCCESS; | 20 | int n, c, status = EXIT_SUCCESS; |
21 | unsigned opt; | 21 | unsigned opt; |
diff --git a/miscutils/taskset.c b/miscutils/taskset.c index 708abd9f2..3175af10d 100644 --- a/miscutils/taskset.c +++ b/miscutils/taskset.c | |||
@@ -40,7 +40,7 @@ static char *__from_cpuset(cpu_set_t *mask) | |||
40 | 40 | ||
41 | 41 | ||
42 | int taskset_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 42 | int taskset_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
43 | int taskset_main(int argc ATTRIBUTE_UNUSED, char **argv) | 43 | int taskset_main(int argc UNUSED_PARAM, char **argv) |
44 | { | 44 | { |
45 | cpu_set_t mask; | 45 | cpu_set_t mask; |
46 | pid_t pid = 0; | 46 | pid_t pid = 0; |
diff --git a/miscutils/time.c b/miscutils/time.c index cce7d5b3e..d8b8aa0c5 100644 --- a/miscutils/time.c +++ b/miscutils/time.c | |||
@@ -396,7 +396,7 @@ static void run_command(char *const *cmd, resource_t *resp) | |||
396 | } | 396 | } |
397 | 397 | ||
398 | int time_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 398 | int time_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
399 | int time_main(int argc ATTRIBUTE_UNUSED, char **argv) | 399 | int time_main(int argc UNUSED_PARAM, char **argv) |
400 | { | 400 | { |
401 | resource_t res; | 401 | resource_t res; |
402 | const char *output_format = default_format; | 402 | const char *output_format = default_format; |
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index 4ad21cbc9..9b1a110ea 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #define OPT_FOREGROUND 0x01 | 13 | #define OPT_FOREGROUND 0x01 |
14 | #define OPT_TIMER 0x02 | 14 | #define OPT_TIMER 0x02 |
15 | 15 | ||
16 | static void watchdog_shutdown(int sig ATTRIBUTE_UNUSED) | 16 | static void watchdog_shutdown(int sig UNUSED_PARAM) |
17 | { | 17 | { |
18 | static const char V = 'V'; | 18 | static const char V = 'V'; |
19 | 19 | ||
diff --git a/modutils/depmod.c b/modutils/depmod.c index 4fba53751..d128ac0ff 100644 --- a/modutils/depmod.c +++ b/modutils/depmod.c | |||
@@ -48,7 +48,7 @@ static char* find_keyword(void *the_module, size_t len, const char * const word) | |||
48 | return ptr; | 48 | return ptr; |
49 | } | 49 | } |
50 | static int FAST_FUNC fileAction(const char *fname, struct stat *sb, | 50 | static int FAST_FUNC fileAction(const char *fname, struct stat *sb, |
51 | void ATTRIBUTE_UNUSED *data, int ATTRIBUTE_UNUSED depth) | 51 | void UNUSED_PARAM *data, int UNUSED_PARAM depth) |
52 | { | 52 | { |
53 | size_t len = sb->st_size; | 53 | size_t len = sb->st_size; |
54 | void *the_module; | 54 | void *the_module; |
@@ -110,7 +110,7 @@ static int FAST_FUNC fileAction(const char *fname, struct stat *sb, | |||
110 | } | 110 | } |
111 | 111 | ||
112 | int depmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 112 | int depmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
113 | int depmod_main(int ATTRIBUTE_UNUSED argc, char **argv) | 113 | int depmod_main(int argc UNUSED_PARAM, char **argv) |
114 | { | 114 | { |
115 | int ret; | 115 | int ret; |
116 | size_t moddir_base_len = 0; /* length of the "-b basedir" */ | 116 | size_t moddir_base_len = 0; /* length of the "-b basedir" */ |
diff --git a/modutils/insmod.c b/modutils/insmod.c index 8217629b2..d928be27d 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c | |||
@@ -792,8 +792,8 @@ static char *m_fullName; | |||
792 | 792 | ||
793 | 793 | ||
794 | static int FAST_FUNC check_module_name_match(const char *filename, | 794 | static int FAST_FUNC check_module_name_match(const char *filename, |
795 | struct stat *statbuf ATTRIBUTE_UNUSED, | 795 | struct stat *statbuf UNUSED_PARAM, |
796 | void *userdata, int depth ATTRIBUTE_UNUSED) | 796 | void *userdata, int depth UNUSED_PARAM) |
797 | { | 797 | { |
798 | char *fullname = (char *) userdata; | 798 | char *fullname = (char *) userdata; |
799 | char *tmp; | 799 | char *tmp; |
@@ -3306,7 +3306,7 @@ static int obj_create_image(struct obj_file *f, char *image) | |||
3306 | 3306 | ||
3307 | /*======================================================================*/ | 3307 | /*======================================================================*/ |
3308 | 3308 | ||
3309 | static struct obj_file *obj_load(FILE *fp, int loadprogbits ATTRIBUTE_UNUSED) | 3309 | static struct obj_file *obj_load(FILE *fp, int loadprogbits UNUSED_PARAM) |
3310 | { | 3310 | { |
3311 | struct obj_file *f; | 3311 | struct obj_file *f; |
3312 | ElfW(Shdr) * section_headers; | 3312 | ElfW(Shdr) * section_headers; |
@@ -4211,9 +4211,9 @@ static const char *moderror(int err) | |||
4211 | 4211 | ||
4212 | #if !ENABLE_FEATURE_2_4_MODULES | 4212 | #if !ENABLE_FEATURE_2_4_MODULES |
4213 | int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 4213 | int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
4214 | int insmod_main(int argc ATTRIBUTE_UNUSED, char **argv) | 4214 | int insmod_main(int argc UNUSED_PARAM, char **argv) |
4215 | #else | 4215 | #else |
4216 | static int insmod_ng_main(int argc ATTRIBUTE_UNUSED, char **argv) | 4216 | static int insmod_ng_main(int argc UNUSED_PARAM, char **argv) |
4217 | #endif | 4217 | #endif |
4218 | { | 4218 | { |
4219 | size_t len; | 4219 | size_t len; |
diff --git a/modutils/lsmod.c b/modutils/lsmod.c index a2330fe98..5e37923a9 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c | |||
@@ -75,7 +75,7 @@ enum { | |||
75 | }; | 75 | }; |
76 | 76 | ||
77 | int lsmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 77 | int lsmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
78 | int lsmod_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 78 | int lsmod_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
79 | { | 79 | { |
80 | struct module_info info; | 80 | struct module_info info; |
81 | char *module_names, *mn, *deps, *dn; | 81 | char *module_names, *mn, *deps, *dn; |
@@ -143,7 +143,7 @@ int lsmod_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | |||
143 | #else /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */ | 143 | #else /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */ |
144 | 144 | ||
145 | int lsmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 145 | int lsmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
146 | int lsmod_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 146 | int lsmod_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
147 | { | 147 | { |
148 | FILE *file = xfopen("/proc/modules", "r"); | 148 | FILE *file = xfopen("/proc/modules", "r"); |
149 | 149 | ||
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index bbcd9895e..6131d4280 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c | |||
@@ -301,9 +301,9 @@ static char* pathname_2_modname(const char *pathname) | |||
301 | } | 301 | } |
302 | 302 | ||
303 | static FAST_FUNC int fileAction(const char *pathname, | 303 | static FAST_FUNC int fileAction(const char *pathname, |
304 | struct stat *sb ATTRIBUTE_UNUSED, | 304 | struct stat *sb UNUSED_PARAM, |
305 | void *data, | 305 | void *data, |
306 | int depth ATTRIBUTE_UNUSED) | 306 | int depth UNUSED_PARAM) |
307 | { | 307 | { |
308 | int cur; | 308 | int cur; |
309 | char *name; | 309 | char *name; |
@@ -581,7 +581,7 @@ Options: | |||
581 | */ | 581 | */ |
582 | 582 | ||
583 | int modprobe_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 583 | int modprobe_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
584 | int modprobe_main(int ATTRIBUTE_UNUSED argc, char **argv) | 584 | int modprobe_main(int argc UNUSED_PARAM, char **argv) |
585 | { | 585 | { |
586 | struct utsname uts; | 586 | struct utsname uts; |
587 | char applet0 = applet_name[0]; | 587 | char applet0 = applet_name[0]; |
diff --git a/networking/arp.c b/networking/arp.c index ae1bb1a2e..ac8c870f8 100644 --- a/networking/arp.c +++ b/networking/arp.c | |||
@@ -441,7 +441,7 @@ static int arp_show(char *name) | |||
441 | } | 441 | } |
442 | 442 | ||
443 | int arp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 443 | int arp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
444 | int arp_main(int argc ATTRIBUTE_UNUSED, char **argv) | 444 | int arp_main(int argc UNUSED_PARAM, char **argv) |
445 | { | 445 | { |
446 | char *hw_type; | 446 | char *hw_type; |
447 | char *protocol; | 447 | char *protocol; |
diff --git a/networking/arping.c b/networking/arping.c index 0a444f15c..aba32b869 100644 --- a/networking/arping.c +++ b/networking/arping.c | |||
@@ -107,7 +107,7 @@ static int send_pack(struct in_addr *src_addr, | |||
107 | return err; | 107 | return err; |
108 | } | 108 | } |
109 | 109 | ||
110 | static void finish(void) ATTRIBUTE_NORETURN; | 110 | static void finish(void) NORETURN; |
111 | static void finish(void) | 111 | static void finish(void) |
112 | { | 112 | { |
113 | if (!(option_mask32 & QUIET)) { | 113 | if (!(option_mask32 & QUIET)) { |
@@ -245,7 +245,7 @@ static bool recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM) | |||
245 | } | 245 | } |
246 | 246 | ||
247 | int arping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 247 | int arping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
248 | int arping_main(int argc ATTRIBUTE_UNUSED, char **argv) | 248 | int arping_main(int argc UNUSED_PARAM, char **argv) |
249 | { | 249 | { |
250 | const char *device = "eth0"; | 250 | const char *device = "eth0"; |
251 | char *source = NULL; | 251 | char *source = NULL; |
diff --git a/networking/brctl.c b/networking/brctl.c index acc789722..102776e80 100644 --- a/networking/brctl.c +++ b/networking/brctl.c | |||
@@ -81,7 +81,7 @@ static void arm_ioctl(unsigned long *args, | |||
81 | 81 | ||
82 | 82 | ||
83 | int brctl_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 83 | int brctl_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
84 | int brctl_main(int argc ATTRIBUTE_UNUSED, char **argv) | 84 | int brctl_main(int argc UNUSED_PARAM, char **argv) |
85 | { | 85 | { |
86 | static const char keywords[] ALIGN1 = | 86 | static const char keywords[] ALIGN1 = |
87 | "addbr\0" "delbr\0" "addif\0" "delif\0" | 87 | "addbr\0" "delbr\0" "addif\0" "delif\0" |
diff --git a/networking/dnsd.c b/networking/dnsd.c index bd0fad4c2..8512f0ceb 100644 --- a/networking/dnsd.c +++ b/networking/dnsd.c | |||
@@ -327,7 +327,7 @@ static void interrupt(int sig) | |||
327 | } | 327 | } |
328 | 328 | ||
329 | int dnsd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 329 | int dnsd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
330 | int dnsd_main(int argc ATTRIBUTE_UNUSED, char **argv) | 330 | int dnsd_main(int argc UNUSED_PARAM, char **argv) |
331 | { | 331 | { |
332 | const char *listen_interface = "0.0.0.0"; | 332 | const char *listen_interface = "0.0.0.0"; |
333 | char *sttl, *sport; | 333 | char *sttl, *sport; |
diff --git a/networking/ether-wake.c b/networking/ether-wake.c index fcd7dd2bc..a37b6eb79 100644 --- a/networking/ether-wake.c +++ b/networking/ether-wake.c | |||
@@ -179,7 +179,7 @@ static int get_wol_pw(const char *ethoptarg, unsigned char *wol_passwd) | |||
179 | } | 179 | } |
180 | 180 | ||
181 | int ether_wake_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 181 | int ether_wake_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
182 | int ether_wake_main(int argc ATTRIBUTE_UNUSED, char **argv) | 182 | int ether_wake_main(int argc UNUSED_PARAM, char **argv) |
183 | { | 183 | { |
184 | const char *ifname = "eth0"; | 184 | const char *ifname = "eth0"; |
185 | char *pass; | 185 | char *pass; |
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index f732d02a4..d39b73ebb 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c | |||
@@ -39,7 +39,7 @@ struct BUG_G_too_big { | |||
39 | #define INIT_G() do { } while (0) | 39 | #define INIT_G() do { } while (0) |
40 | 40 | ||
41 | 41 | ||
42 | static void ftp_die(const char *msg) ATTRIBUTE_NORETURN; | 42 | static void ftp_die(const char *msg) NORETURN; |
43 | static void ftp_die(const char *msg) | 43 | static void ftp_die(const char *msg) |
44 | { | 44 | { |
45 | char *cp = buf; /* buf holds peer's response */ | 45 | char *cp = buf; /* buf holds peer's response */ |
@@ -276,7 +276,7 @@ static const char ftpgetput_longopts[] ALIGN1 = | |||
276 | #endif | 276 | #endif |
277 | 277 | ||
278 | int ftpgetput_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 278 | int ftpgetput_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
279 | int ftpgetput_main(int argc ATTRIBUTE_UNUSED, char **argv) | 279 | int ftpgetput_main(int argc UNUSED_PARAM, char **argv) |
280 | { | 280 | { |
281 | unsigned opt; | 281 | unsigned opt; |
282 | const char *port = "ftp"; | 282 | const char *port = "ftp"; |
diff --git a/networking/httpd.c b/networking/httpd.c index 9b4b7172d..30ef30552 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -338,7 +338,7 @@ enum { | |||
338 | SEND_BODY = (1 << 1), | 338 | SEND_BODY = (1 << 1), |
339 | SEND_HEADERS_AND_BODY = SEND_HEADERS + SEND_BODY, | 339 | SEND_HEADERS_AND_BODY = SEND_HEADERS + SEND_BODY, |
340 | }; | 340 | }; |
341 | static void send_file_and_exit(const char *url, int what) ATTRIBUTE_NORETURN; | 341 | static void send_file_and_exit(const char *url, int what) NORETURN; |
342 | 342 | ||
343 | static void free_llist(has_next_ptr **pptr) | 343 | static void free_llist(has_next_ptr **pptr) |
344 | { | 344 | { |
@@ -919,7 +919,7 @@ static int openServer(void) | |||
919 | /* | 919 | /* |
920 | * Log the connection closure and exit. | 920 | * Log the connection closure and exit. |
921 | */ | 921 | */ |
922 | static void log_and_exit(void) ATTRIBUTE_NORETURN; | 922 | static void log_and_exit(void) NORETURN; |
923 | static void log_and_exit(void) | 923 | static void log_and_exit(void) |
924 | { | 924 | { |
925 | /* Paranoia. IE said to be buggy. It may send some extra data | 925 | /* Paranoia. IE said to be buggy. It may send some extra data |
@@ -1050,7 +1050,7 @@ static void send_headers(int responseNum) | |||
1050 | } | 1050 | } |
1051 | } | 1051 | } |
1052 | 1052 | ||
1053 | static void send_headers_and_exit(int responseNum) ATTRIBUTE_NORETURN; | 1053 | static void send_headers_and_exit(int responseNum) NORETURN; |
1054 | static void send_headers_and_exit(int responseNum) | 1054 | static void send_headers_and_exit(int responseNum) |
1055 | { | 1055 | { |
1056 | send_headers(responseNum); | 1056 | send_headers(responseNum); |
@@ -1094,7 +1094,7 @@ static int get_line(void) | |||
1094 | #if ENABLE_FEATURE_HTTPD_CGI || ENABLE_FEATURE_HTTPD_PROXY | 1094 | #if ENABLE_FEATURE_HTTPD_CGI || ENABLE_FEATURE_HTTPD_PROXY |
1095 | 1095 | ||
1096 | /* gcc 4.2.1 fares better with NOINLINE */ | 1096 | /* gcc 4.2.1 fares better with NOINLINE */ |
1097 | static NOINLINE void cgi_io_loop_and_exit(int fromCgi_rd, int toCgi_wr, int post_len) ATTRIBUTE_NORETURN; | 1097 | static NOINLINE void cgi_io_loop_and_exit(int fromCgi_rd, int toCgi_wr, int post_len) NORETURN; |
1098 | static NOINLINE void cgi_io_loop_and_exit(int fromCgi_rd, int toCgi_wr, int post_len) | 1098 | static NOINLINE void cgi_io_loop_and_exit(int fromCgi_rd, int toCgi_wr, int post_len) |
1099 | { | 1099 | { |
1100 | enum { FROM_CGI = 1, TO_CGI = 2 }; /* indexes in pfd[] */ | 1100 | enum { FROM_CGI = 1, TO_CGI = 2 }; /* indexes in pfd[] */ |
@@ -1292,7 +1292,7 @@ static void send_cgi_and_exit( | |||
1292 | const char *request, | 1292 | const char *request, |
1293 | int post_len, | 1293 | int post_len, |
1294 | const char *cookie, | 1294 | const char *cookie, |
1295 | const char *content_type) ATTRIBUTE_NORETURN; | 1295 | const char *content_type) NORETURN; |
1296 | static void send_cgi_and_exit( | 1296 | static void send_cgi_and_exit( |
1297 | const char *url, | 1297 | const char *url, |
1298 | const char *request, | 1298 | const char *request, |
@@ -1752,8 +1752,8 @@ static Htaccess_Proxy *find_proxy_entry(const char *url) | |||
1752 | /* | 1752 | /* |
1753 | * Handle timeouts | 1753 | * Handle timeouts |
1754 | */ | 1754 | */ |
1755 | static void exit_on_signal(int sig) ATTRIBUTE_NORETURN; | 1755 | static void exit_on_signal(int sig) NORETURN; |
1756 | static void exit_on_signal(int sig ATTRIBUTE_UNUSED) | 1756 | static void exit_on_signal(int sig UNUSED_PARAM) |
1757 | { | 1757 | { |
1758 | send_headers_and_exit(HTTP_REQUEST_TIMEOUT); | 1758 | send_headers_and_exit(HTTP_REQUEST_TIMEOUT); |
1759 | } | 1759 | } |
@@ -1761,7 +1761,7 @@ static void exit_on_signal(int sig ATTRIBUTE_UNUSED) | |||
1761 | /* | 1761 | /* |
1762 | * Handle an incoming http request and exit. | 1762 | * Handle an incoming http request and exit. |
1763 | */ | 1763 | */ |
1764 | static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr) ATTRIBUTE_NORETURN; | 1764 | static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr) NORETURN; |
1765 | static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr) | 1765 | static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr) |
1766 | { | 1766 | { |
1767 | static const char request_GET[] ALIGN1 = "GET"; | 1767 | static const char request_GET[] ALIGN1 = "GET"; |
@@ -2151,7 +2151,7 @@ static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr) | |||
2151 | * Never returns. | 2151 | * Never returns. |
2152 | */ | 2152 | */ |
2153 | #if BB_MMU | 2153 | #if BB_MMU |
2154 | static void mini_httpd(int server_socket) ATTRIBUTE_NORETURN; | 2154 | static void mini_httpd(int server_socket) NORETURN; |
2155 | static void mini_httpd(int server_socket) | 2155 | static void mini_httpd(int server_socket) |
2156 | { | 2156 | { |
2157 | /* NB: it's best to not use xfuncs in this loop before fork(). | 2157 | /* NB: it's best to not use xfuncs in this loop before fork(). |
@@ -2190,7 +2190,7 @@ static void mini_httpd(int server_socket) | |||
2190 | /* never reached */ | 2190 | /* never reached */ |
2191 | } | 2191 | } |
2192 | #else | 2192 | #else |
2193 | static void mini_httpd_nommu(int server_socket, int argc, char **argv) ATTRIBUTE_NORETURN; | 2193 | static void mini_httpd_nommu(int server_socket, int argc, char **argv) NORETURN; |
2194 | static void mini_httpd_nommu(int server_socket, int argc, char **argv) | 2194 | static void mini_httpd_nommu(int server_socket, int argc, char **argv) |
2195 | { | 2195 | { |
2196 | char *argv_copy[argc + 2]; | 2196 | char *argv_copy[argc + 2]; |
@@ -2241,7 +2241,7 @@ static void mini_httpd_nommu(int server_socket, int argc, char **argv) | |||
2241 | * Process a HTTP connection on stdin/out. | 2241 | * Process a HTTP connection on stdin/out. |
2242 | * Never returns. | 2242 | * Never returns. |
2243 | */ | 2243 | */ |
2244 | static void mini_httpd_inetd(void) ATTRIBUTE_NORETURN; | 2244 | static void mini_httpd_inetd(void) NORETURN; |
2245 | static void mini_httpd_inetd(void) | 2245 | static void mini_httpd_inetd(void) |
2246 | { | 2246 | { |
2247 | len_and_sockaddr fromAddr; | 2247 | len_and_sockaddr fromAddr; |
@@ -2289,7 +2289,7 @@ enum { | |||
2289 | 2289 | ||
2290 | 2290 | ||
2291 | int httpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 2291 | int httpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
2292 | int httpd_main(int argc ATTRIBUTE_UNUSED, char **argv) | 2292 | int httpd_main(int argc UNUSED_PARAM, char **argv) |
2293 | { | 2293 | { |
2294 | int server_socket = server_socket; /* for gcc */ | 2294 | int server_socket = server_socket; /* for gcc */ |
2295 | unsigned opt; | 2295 | unsigned opt; |
diff --git a/networking/ifenslave.c b/networking/ifenslave.c index 4c7eadc83..13a32efc8 100644 --- a/networking/ifenslave.c +++ b/networking/ifenslave.c | |||
@@ -446,7 +446,7 @@ static NOINLINE void get_drv_info(char *master_ifname) | |||
446 | } | 446 | } |
447 | 447 | ||
448 | int ifenslave_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 448 | int ifenslave_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
449 | int ifenslave_main(int argc ATTRIBUTE_UNUSED, char **argv) | 449 | int ifenslave_main(int argc UNUSED_PARAM, char **argv) |
450 | { | 450 | { |
451 | char *master_ifname, *slave_ifname; | 451 | char *master_ifname, *slave_ifname; |
452 | int rv; | 452 | int rv; |
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index c12391863..af7bb6e17 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -512,8 +512,8 @@ static int dhcp_up(struct interface_defn_t *ifd, execfn *exec) | |||
512 | ifd, exec); | 512 | ifd, exec); |
513 | } | 513 | } |
514 | #else | 514 | #else |
515 | static int dhcp_up(struct interface_defn_t *ifd ATTRIBUTE_UNUSED, | 515 | static int dhcp_up(struct interface_defn_t *ifd UNUSED_PARAM, |
516 | execfn *exec ATTRIBUTE_UNUSED) | 516 | execfn *exec UNUSED_PARAM) |
517 | { | 517 | { |
518 | return 0; /* no dhcp support */ | 518 | return 0; /* no dhcp support */ |
519 | } | 519 | } |
@@ -537,14 +537,14 @@ static int dhcp_down(struct interface_defn_t *ifd, execfn *exec) | |||
537 | "`cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec); | 537 | "`cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec); |
538 | } | 538 | } |
539 | #else | 539 | #else |
540 | static int dhcp_down(struct interface_defn_t *ifd ATTRIBUTE_UNUSED, | 540 | static int dhcp_down(struct interface_defn_t *ifd UNUSED_PARAM, |
541 | execfn *exec ATTRIBUTE_UNUSED) | 541 | execfn *exec UNUSED_PARAM) |
542 | { | 542 | { |
543 | return 0; /* no dhcp support */ | 543 | return 0; /* no dhcp support */ |
544 | } | 544 | } |
545 | #endif | 545 | #endif |
546 | 546 | ||
547 | static int manual_up_down(struct interface_defn_t *ifd ATTRIBUTE_UNUSED, execfn *exec ATTRIBUTE_UNUSED) | 547 | static int manual_up_down(struct interface_defn_t *ifd UNUSED_PARAM, execfn *exec UNUSED_PARAM) |
548 | { | 548 | { |
549 | return 1; | 549 | return 1; |
550 | } | 550 | } |
diff --git a/networking/inetd.c b/networking/inetd.c index 08c09953b..5f352710b 100644 --- a/networking/inetd.c +++ b/networking/inetd.c | |||
@@ -887,7 +887,7 @@ static int same_serv_addr_proto(servtab_t *old, servtab_t *new) | |||
887 | return 1; | 887 | return 1; |
888 | } | 888 | } |
889 | 889 | ||
890 | static void reread_config_file(int sig ATTRIBUTE_UNUSED) | 890 | static void reread_config_file(int sig UNUSED_PARAM) |
891 | { | 891 | { |
892 | servtab_t *sep, *cp, **sepp; | 892 | servtab_t *sep, *cp, **sepp; |
893 | len_and_sockaddr *lsa; | 893 | len_and_sockaddr *lsa; |
@@ -1057,7 +1057,7 @@ static void reread_config_file(int sig ATTRIBUTE_UNUSED) | |||
1057 | restore_sigmask(&omask); | 1057 | restore_sigmask(&omask); |
1058 | } | 1058 | } |
1059 | 1059 | ||
1060 | static void reap_child(int sig ATTRIBUTE_UNUSED) | 1060 | static void reap_child(int sig UNUSED_PARAM) |
1061 | { | 1061 | { |
1062 | pid_t pid; | 1062 | pid_t pid; |
1063 | int status; | 1063 | int status; |
@@ -1084,7 +1084,7 @@ static void reap_child(int sig ATTRIBUTE_UNUSED) | |||
1084 | errno = save_errno; | 1084 | errno = save_errno; |
1085 | } | 1085 | } |
1086 | 1086 | ||
1087 | static void retry_network_setup(int sig ATTRIBUTE_UNUSED) | 1087 | static void retry_network_setup(int sig UNUSED_PARAM) |
1088 | { | 1088 | { |
1089 | servtab_t *sep; | 1089 | servtab_t *sep; |
1090 | 1090 | ||
@@ -1100,7 +1100,7 @@ static void retry_network_setup(int sig ATTRIBUTE_UNUSED) | |||
1100 | } | 1100 | } |
1101 | } | 1101 | } |
1102 | 1102 | ||
1103 | static void clean_up_and_exit(int sig ATTRIBUTE_UNUSED) | 1103 | static void clean_up_and_exit(int sig UNUSED_PARAM) |
1104 | { | 1104 | { |
1105 | servtab_t *sep; | 1105 | servtab_t *sep; |
1106 | 1106 | ||
@@ -1128,7 +1128,7 @@ static void clean_up_and_exit(int sig ATTRIBUTE_UNUSED) | |||
1128 | } | 1128 | } |
1129 | 1129 | ||
1130 | int inetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 1130 | int inetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
1131 | int inetd_main(int argc ATTRIBUTE_UNUSED, char **argv) | 1131 | int inetd_main(int argc UNUSED_PARAM, char **argv) |
1132 | { | 1132 | { |
1133 | struct sigaction sa, saved_pipe_handler; | 1133 | struct sigaction sa, saved_pipe_handler; |
1134 | servtab_t *sep, *sep2; | 1134 | servtab_t *sep, *sep2; |
@@ -1423,7 +1423,7 @@ static const char *const cat_args[] = { "cat", NULL }; | |||
1423 | #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO | 1423 | #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO |
1424 | /* Echo service -- echo data back. */ | 1424 | /* Echo service -- echo data back. */ |
1425 | /* ARGSUSED */ | 1425 | /* ARGSUSED */ |
1426 | static void echo_stream(int s, servtab_t *sep ATTRIBUTE_UNUSED) | 1426 | static void echo_stream(int s, servtab_t *sep UNUSED_PARAM) |
1427 | { | 1427 | { |
1428 | #if BB_MMU | 1428 | #if BB_MMU |
1429 | while (1) { | 1429 | while (1) { |
@@ -1464,7 +1464,7 @@ static void echo_dg(int s, servtab_t *sep) | |||
1464 | #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD | 1464 | #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD |
1465 | /* Discard service -- ignore data. MMU arches only. */ | 1465 | /* Discard service -- ignore data. MMU arches only. */ |
1466 | /* ARGSUSED */ | 1466 | /* ARGSUSED */ |
1467 | static void discard_stream(int s, servtab_t *sep ATTRIBUTE_UNUSED) | 1467 | static void discard_stream(int s, servtab_t *sep UNUSED_PARAM) |
1468 | { | 1468 | { |
1469 | #if BB_MMU | 1469 | #if BB_MMU |
1470 | while (safe_read(s, line, LINE_SIZE) > 0) | 1470 | while (safe_read(s, line, LINE_SIZE) > 0) |
@@ -1483,7 +1483,7 @@ static void discard_stream(int s, servtab_t *sep ATTRIBUTE_UNUSED) | |||
1483 | #endif | 1483 | #endif |
1484 | } | 1484 | } |
1485 | /* ARGSUSED */ | 1485 | /* ARGSUSED */ |
1486 | static void discard_dg(int s, servtab_t *sep ATTRIBUTE_UNUSED) | 1486 | static void discard_dg(int s, servtab_t *sep UNUSED_PARAM) |
1487 | { | 1487 | { |
1488 | /* dgram builtins are non-forking - DONT BLOCK! */ | 1488 | /* dgram builtins are non-forking - DONT BLOCK! */ |
1489 | recv(s, line, LINE_SIZE, MSG_DONTWAIT); | 1489 | recv(s, line, LINE_SIZE, MSG_DONTWAIT); |
@@ -1504,7 +1504,7 @@ static void init_ring(void) | |||
1504 | } | 1504 | } |
1505 | /* Character generator. MMU arches only. */ | 1505 | /* Character generator. MMU arches only. */ |
1506 | /* ARGSUSED */ | 1506 | /* ARGSUSED */ |
1507 | static void chargen_stream(int s, servtab_t *sep ATTRIBUTE_UNUSED) | 1507 | static void chargen_stream(int s, servtab_t *sep UNUSED_PARAM) |
1508 | { | 1508 | { |
1509 | char *rs; | 1509 | char *rs; |
1510 | int len; | 1510 | int len; |
@@ -1581,7 +1581,7 @@ static uint32_t machtime(void) | |||
1581 | return htonl((uint32_t)(tv.tv_sec + 2208988800)); | 1581 | return htonl((uint32_t)(tv.tv_sec + 2208988800)); |
1582 | } | 1582 | } |
1583 | /* ARGSUSED */ | 1583 | /* ARGSUSED */ |
1584 | static void machtime_stream(int s, servtab_t *sep ATTRIBUTE_UNUSED) | 1584 | static void machtime_stream(int s, servtab_t *sep UNUSED_PARAM) |
1585 | { | 1585 | { |
1586 | uint32_t result; | 1586 | uint32_t result; |
1587 | 1587 | ||
@@ -1606,7 +1606,7 @@ static void machtime_dg(int s, servtab_t *sep) | |||
1606 | #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME | 1606 | #if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME |
1607 | /* Return human-readable time of day */ | 1607 | /* Return human-readable time of day */ |
1608 | /* ARGSUSED */ | 1608 | /* ARGSUSED */ |
1609 | static void daytime_stream(int s, servtab_t *sep ATTRIBUTE_UNUSED) | 1609 | static void daytime_stream(int s, servtab_t *sep UNUSED_PARAM) |
1610 | { | 1610 | { |
1611 | time_t t; | 1611 | time_t t; |
1612 | 1612 | ||
diff --git a/networking/interface.c b/networking/interface.c index afc7d0b80..83b24f1d6 100644 --- a/networking/interface.c +++ b/networking/interface.c | |||
@@ -244,7 +244,7 @@ static char* FAST_FUNC UNSPEC_print(unsigned char *ptr) | |||
244 | } | 244 | } |
245 | 245 | ||
246 | /* Display an UNSPEC socket address. */ | 246 | /* Display an UNSPEC socket address. */ |
247 | static const char* FAST_FUNC UNSPEC_sprint(struct sockaddr *sap, int numeric ATTRIBUTE_UNUSED) | 247 | static const char* FAST_FUNC UNSPEC_sprint(struct sockaddr *sap, int numeric UNUSED_PARAM) |
248 | { | 248 | { |
249 | if (sap->sa_family == 0xFFFF || sap->sa_family == 0) | 249 | if (sap->sa_family == 0xFFFF || sap->sa_family == 0) |
250 | return "[NONE SET]"; | 250 | return "[NONE SET]"; |
diff --git a/networking/ip.c b/networking/ip.c index 5249217eb..7dcddfd8c 100644 --- a/networking/ip.c +++ b/networking/ip.c | |||
@@ -24,7 +24,7 @@ | |||
24 | || ENABLE_FEATURE_IP_TUNNEL \ | 24 | || ENABLE_FEATURE_IP_TUNNEL \ |
25 | || ENABLE_FEATURE_IP_RULE | 25 | || ENABLE_FEATURE_IP_RULE |
26 | 26 | ||
27 | static int ATTRIBUTE_NORETURN ip_print_help(char ATTRIBUTE_UNUSED **argv) | 27 | static int NORETURN ip_print_help(char **argv UNUSED_PARAM) |
28 | { | 28 | { |
29 | bb_show_usage(); | 29 | bb_show_usage(); |
30 | } | 30 | } |
@@ -37,35 +37,35 @@ static int ip_do(int (*ip_func)(char **argv), char **argv) | |||
37 | 37 | ||
38 | #if ENABLE_FEATURE_IP_ADDRESS | 38 | #if ENABLE_FEATURE_IP_ADDRESS |
39 | int ipaddr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 39 | int ipaddr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
40 | int ipaddr_main(int argc ATTRIBUTE_UNUSED, char **argv) | 40 | int ipaddr_main(int argc UNUSED_PARAM, char **argv) |
41 | { | 41 | { |
42 | return ip_do(do_ipaddr, argv); | 42 | return ip_do(do_ipaddr, argv); |
43 | } | 43 | } |
44 | #endif | 44 | #endif |
45 | #if ENABLE_FEATURE_IP_LINK | 45 | #if ENABLE_FEATURE_IP_LINK |
46 | int iplink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 46 | int iplink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
47 | int iplink_main(int argc ATTRIBUTE_UNUSED, char **argv) | 47 | int iplink_main(int argc UNUSED_PARAM, char **argv) |
48 | { | 48 | { |
49 | return ip_do(do_iplink, argv); | 49 | return ip_do(do_iplink, argv); |
50 | } | 50 | } |
51 | #endif | 51 | #endif |
52 | #if ENABLE_FEATURE_IP_ROUTE | 52 | #if ENABLE_FEATURE_IP_ROUTE |
53 | int iproute_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 53 | int iproute_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
54 | int iproute_main(int argc ATTRIBUTE_UNUSED, char **argv) | 54 | int iproute_main(int argc UNUSED_PARAM, char **argv) |
55 | { | 55 | { |
56 | return ip_do(do_iproute, argv); | 56 | return ip_do(do_iproute, argv); |
57 | } | 57 | } |
58 | #endif | 58 | #endif |
59 | #if ENABLE_FEATURE_IP_RULE | 59 | #if ENABLE_FEATURE_IP_RULE |
60 | int iprule_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 60 | int iprule_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
61 | int iprule_main(int argc ATTRIBUTE_UNUSED, char **argv) | 61 | int iprule_main(int argc UNUSED_PARAM, char **argv) |
62 | { | 62 | { |
63 | return ip_do(do_iprule, argv); | 63 | return ip_do(do_iprule, argv); |
64 | } | 64 | } |
65 | #endif | 65 | #endif |
66 | #if ENABLE_FEATURE_IP_TUNNEL | 66 | #if ENABLE_FEATURE_IP_TUNNEL |
67 | int iptunnel_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 67 | int iptunnel_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
68 | int iptunnel_main(int argc ATTRIBUTE_UNUSED, char **argv) | 68 | int iptunnel_main(int argc UNUSED_PARAM, char **argv) |
69 | { | 69 | { |
70 | return ip_do(do_iptunnel, argv); | 70 | return ip_do(do_iptunnel, argv); |
71 | } | 71 | } |
@@ -73,7 +73,7 @@ int iptunnel_main(int argc ATTRIBUTE_UNUSED, char **argv) | |||
73 | 73 | ||
74 | 74 | ||
75 | int ip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 75 | int ip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
76 | int ip_main(int argc ATTRIBUTE_UNUSED, char **argv) | 76 | int ip_main(int argc UNUSED_PARAM, char **argv) |
77 | { | 77 | { |
78 | static const char keywords[] ALIGN1 = | 78 | static const char keywords[] ALIGN1 = |
79 | USE_FEATURE_IP_ADDRESS("address\0") | 79 | USE_FEATURE_IP_ADDRESS("address\0") |
diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c index 3e0563298..e08ebd4b3 100644 --- a/networking/isrv_identd.c +++ b/networking/isrv_identd.c | |||
@@ -76,7 +76,7 @@ static int do_rd(int fd, void **paramp) | |||
76 | return retval; | 76 | return retval; |
77 | } | 77 | } |
78 | 78 | ||
79 | static int do_timeout(void **paramp ATTRIBUTE_UNUSED) | 79 | static int do_timeout(void **paramp UNUSED_PARAM) |
80 | { | 80 | { |
81 | return 1; /* terminate session */ | 81 | return 1; /* terminate session */ |
82 | } | 82 | } |
@@ -93,7 +93,7 @@ static void inetd_mode(void) | |||
93 | } | 93 | } |
94 | 94 | ||
95 | int fakeidentd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 95 | int fakeidentd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
96 | int fakeidentd_main(int argc ATTRIBUTE_UNUSED, char **argv) | 96 | int fakeidentd_main(int argc UNUSED_PARAM, char **argv) |
97 | { | 97 | { |
98 | enum { | 98 | enum { |
99 | OPT_foreground = 0x1, | 99 | OPT_foreground = 0x1, |
diff --git a/networking/libiproute/ip_common.h b/networking/libiproute/ip_common.h index 346d0b96c..305b491c6 100644 --- a/networking/libiproute/ip_common.h +++ b/networking/libiproute/ip_common.h | |||
@@ -21,7 +21,7 @@ extern char **ip_parse_common_args(char **argv); | |||
21 | extern int print_neigh(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); | 21 | extern int print_neigh(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); |
22 | extern int ipaddr_list_or_flush(char **argv, int flush); | 22 | extern int ipaddr_list_or_flush(char **argv, int flush); |
23 | extern int iproute_monitor(char **argv); | 23 | extern int iproute_monitor(char **argv); |
24 | extern void iplink_usage(void) ATTRIBUTE_NORETURN; | 24 | extern void iplink_usage(void) NORETURN; |
25 | extern void ipneigh_reset_filter(void); | 25 | extern void ipneigh_reset_filter(void); |
26 | 26 | ||
27 | extern int do_ipaddr(char **argv); | 27 | extern int do_ipaddr(char **argv); |
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index 7a948a19d..288dccae7 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c | |||
@@ -196,8 +196,8 @@ static int flush_update(void) | |||
196 | return 0; | 196 | return 0; |
197 | } | 197 | } |
198 | 198 | ||
199 | static int print_addrinfo(const struct sockaddr_nl *who ATTRIBUTE_UNUSED, | 199 | static int print_addrinfo(const struct sockaddr_nl *who UNUSED_PARAM, |
200 | struct nlmsghdr *n, void *arg ATTRIBUTE_UNUSED) | 200 | struct nlmsghdr *n, void *arg UNUSED_PARAM) |
201 | { | 201 | { |
202 | struct ifaddrmsg *ifa = NLMSG_DATA(n); | 202 | struct ifaddrmsg *ifa = NLMSG_DATA(n); |
203 | int len = n->nlmsg_len; | 203 | int len = n->nlmsg_len; |
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index 5aad6ed9f..3b212eed9 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c | |||
@@ -154,7 +154,7 @@ static void set_address(struct ifreq *ifr, int brd) | |||
154 | } | 154 | } |
155 | 155 | ||
156 | 156 | ||
157 | static void die_must_be_on_off(const char *msg) ATTRIBUTE_NORETURN; | 157 | static void die_must_be_on_off(const char *msg) NORETURN; |
158 | static void die_must_be_on_off(const char *msg) | 158 | static void die_must_be_on_off(const char *msg) |
159 | { | 159 | { |
160 | bb_error_msg_and_die("argument of \"%s\" must be \"on\" or \"off\"", msg); | 160 | bb_error_msg_and_die("argument of \"%s\" must be \"on\" or \"off\"", msg); |
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index 07a88c4dd..17af41f9c 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
@@ -78,8 +78,8 @@ static unsigned get_hz(void) | |||
78 | return hz_internal; | 78 | return hz_internal; |
79 | } | 79 | } |
80 | 80 | ||
81 | static int print_route(const struct sockaddr_nl *who ATTRIBUTE_UNUSED, | 81 | static int print_route(const struct sockaddr_nl *who UNUSED_PARAM, |
82 | struct nlmsghdr *n, void *arg ATTRIBUTE_UNUSED) | 82 | struct nlmsghdr *n, void *arg UNUSED_PARAM) |
83 | { | 83 | { |
84 | struct rtmsg *r = NLMSG_DATA(n); | 84 | struct rtmsg *r = NLMSG_DATA(n); |
85 | int len = n->nlmsg_len; | 85 | int len = n->nlmsg_len; |
diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c index 2ee7701f8..f92607830 100644 --- a/networking/libiproute/iprule.c +++ b/networking/libiproute/iprule.c | |||
@@ -40,8 +40,8 @@ static void usage(void) | |||
40 | } | 40 | } |
41 | */ | 41 | */ |
42 | 42 | ||
43 | static int print_rule(const struct sockaddr_nl *who ATTRIBUTE_UNUSED, | 43 | static int print_rule(const struct sockaddr_nl *who UNUSED_PARAM, |
44 | struct nlmsghdr *n, void *arg ATTRIBUTE_UNUSED) | 44 | struct nlmsghdr *n, void *arg UNUSED_PARAM) |
45 | { | 45 | { |
46 | struct rtmsg *r = NLMSG_DATA(n); | 46 | struct rtmsg *r = NLMSG_DATA(n); |
47 | int len = n->nlmsg_len; | 47 | int len = n->nlmsg_len; |
diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c index f9b697070..eeae4e252 100644 --- a/networking/libiproute/ll_map.c +++ b/networking/libiproute/ll_map.c | |||
@@ -39,9 +39,9 @@ static struct idxmap *find_by_index(int idx) | |||
39 | return NULL; | 39 | return NULL; |
40 | } | 40 | } |
41 | 41 | ||
42 | int ll_remember_index(const struct sockaddr_nl *who ATTRIBUTE_UNUSED, | 42 | int ll_remember_index(const struct sockaddr_nl *who UNUSED_PARAM, |
43 | struct nlmsghdr *n, | 43 | struct nlmsghdr *n, |
44 | void *arg ATTRIBUTE_UNUSED) | 44 | void *arg UNUSED_PARAM) |
45 | { | 45 | { |
46 | int h; | 46 | int h; |
47 | struct ifinfomsg *ifi = NLMSG_DATA(n); | 47 | struct ifinfomsg *ifi = NLMSG_DATA(n); |
diff --git a/networking/libiproute/utils.c b/networking/libiproute/utils.c index e63bb27fb..706710e1f 100644 --- a/networking/libiproute/utils.c +++ b/networking/libiproute/utils.c | |||
@@ -279,7 +279,7 @@ int inet_addr_match(inet_prefix * a, inet_prefix * b, int bits) | |||
279 | return 0; | 279 | return 0; |
280 | } | 280 | } |
281 | 281 | ||
282 | const char *rt_addr_n2a(int af, int ATTRIBUTE_UNUSED len, | 282 | const char *rt_addr_n2a(int af, int UNUSED_PARAM len, |
283 | void *addr, char *buf, int buflen) | 283 | void *addr, char *buf, int buflen) |
284 | { | 284 | { |
285 | switch (af) { | 285 | switch (af) { |
diff --git a/networking/libiproute/utils.h b/networking/libiproute/utils.h index 06b1f04ab..607083af8 100644 --- a/networking/libiproute/utils.h +++ b/networking/libiproute/utils.h | |||
@@ -28,7 +28,7 @@ extern char _SL_; | |||
28 | #define SPRINT_BSIZE 64 | 28 | #define SPRINT_BSIZE 64 |
29 | #define SPRINT_BUF(x) char x[SPRINT_BSIZE] | 29 | #define SPRINT_BUF(x) char x[SPRINT_BSIZE] |
30 | 30 | ||
31 | extern void incomplete_command(void) ATTRIBUTE_NORETURN; | 31 | extern void incomplete_command(void) NORETURN; |
32 | 32 | ||
33 | #define NEXT_ARG() do { if (!*++argv) incomplete_command(); } while (0) | 33 | #define NEXT_ARG() do { if (!*++argv) incomplete_command(); } while (0) |
34 | 34 | ||
@@ -76,9 +76,9 @@ extern int get_s8(int8_t *val, char *arg, int base); | |||
76 | extern const char *format_host(int af, int len, void *addr, char *buf, int buflen); | 76 | extern const char *format_host(int af, int len, void *addr, char *buf, int buflen); |
77 | extern const char *rt_addr_n2a(int af, int len, void *addr, char *buf, int buflen); | 77 | extern const char *rt_addr_n2a(int af, int len, void *addr, char *buf, int buflen); |
78 | 78 | ||
79 | void invarg(const char *, const char *) ATTRIBUTE_NORETURN; | 79 | void invarg(const char *, const char *) NORETURN; |
80 | void duparg(const char *, const char *) ATTRIBUTE_NORETURN; | 80 | void duparg(const char *, const char *) NORETURN; |
81 | void duparg2(const char *, const char *) ATTRIBUTE_NORETURN; | 81 | void duparg2(const char *, const char *) NORETURN; |
82 | int inet_addr_match(inet_prefix *a, inet_prefix *b, int bits); | 82 | int inet_addr_match(inet_prefix *a, inet_prefix *b, int bits); |
83 | 83 | ||
84 | const char *dnet_ntop(int af, const void *addr, char *str, size_t len); | 84 | const char *dnet_ntop(int af, const void *addr, char *str, size_t len); |
diff --git a/networking/nc.c b/networking/nc.c index 2fd42d5f6..1a99f91cc 100644 --- a/networking/nc.c +++ b/networking/nc.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * when compared to "standard" nc | 17 | * when compared to "standard" nc |
18 | */ | 18 | */ |
19 | 19 | ||
20 | static void timeout(int signum ATTRIBUTE_UNUSED) | 20 | static void timeout(int signum UNUSED_PARAM) |
21 | { | 21 | { |
22 | bb_error_msg_and_die("timed out"); | 22 | bb_error_msg_and_die("timed out"); |
23 | } | 23 | } |
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c index 5f7bd0372..41db94524 100644 --- a/networking/nc_bloaty.c +++ b/networking/nc_bloaty.c | |||
@@ -177,7 +177,7 @@ static void unarm(void) | |||
177 | } | 177 | } |
178 | 178 | ||
179 | /* timeout and other signal handling cruft */ | 179 | /* timeout and other signal handling cruft */ |
180 | static void tmtravel(int sig ATTRIBUTE_UNUSED) | 180 | static void tmtravel(int sig UNUSED_PARAM) |
181 | { | 181 | { |
182 | unarm(); | 182 | unarm(); |
183 | longjmp(jbuf, 1); | 183 | longjmp(jbuf, 1); |
@@ -222,7 +222,7 @@ Debug("findline returning whole thing: %d", siz); | |||
222 | that would be security-critical, which is why it's ifdefed out by default. | 222 | that would be security-critical, which is why it's ifdefed out by default. |
223 | Use at your own hairy risk; if you leave shells lying around behind open | 223 | Use at your own hairy risk; if you leave shells lying around behind open |
224 | listening ports you deserve to lose!! */ | 224 | listening ports you deserve to lose!! */ |
225 | static int doexec(char **proggie) ATTRIBUTE_NORETURN; | 225 | static int doexec(char **proggie) NORETURN; |
226 | static int doexec(char **proggie) | 226 | static int doexec(char **proggie) |
227 | { | 227 | { |
228 | xmove_fd(netfd, 0); | 228 | xmove_fd(netfd, 0); |
diff --git a/networking/netstat.c b/networking/netstat.c index fd8d8ecf3..24b26545e 100644 --- a/networking/netstat.c +++ b/networking/netstat.c | |||
@@ -486,7 +486,7 @@ static void do_info(const char *file, const char *name, int (*proc)(int, char *) | |||
486 | } | 486 | } |
487 | 487 | ||
488 | int netstat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 488 | int netstat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
489 | int netstat_main(int argc ATTRIBUTE_UNUSED, char **argv) | 489 | int netstat_main(int argc UNUSED_PARAM, char **argv) |
490 | { | 490 | { |
491 | const char *net_conn_line_header = PRINT_NET_CONN_HEADER; | 491 | const char *net_conn_line_header = PRINT_NET_CONN_HEADER; |
492 | unsigned opt; | 492 | unsigned opt; |
diff --git a/networking/ping.c b/networking/ping.c index 3ac9481c8..5def8c335 100644 --- a/networking/ping.c +++ b/networking/ping.c | |||
@@ -80,7 +80,7 @@ static int in_cksum(unsigned short *buf, int sz) | |||
80 | 80 | ||
81 | static char *hostname; | 81 | static char *hostname; |
82 | 82 | ||
83 | static void noresp(int ign ATTRIBUTE_UNUSED) | 83 | static void noresp(int ign UNUSED_PARAM) |
84 | { | 84 | { |
85 | printf("No response from %s\n", hostname); | 85 | printf("No response from %s\n", hostname); |
86 | exit(EXIT_FAILURE); | 86 | exit(EXIT_FAILURE); |
@@ -174,7 +174,7 @@ static void ping6(len_and_sockaddr *lsa) | |||
174 | #endif | 174 | #endif |
175 | 175 | ||
176 | int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 176 | int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
177 | int ping_main(int argc ATTRIBUTE_UNUSED, char **argv) | 177 | int ping_main(int argc UNUSED_PARAM, char **argv) |
178 | { | 178 | { |
179 | len_and_sockaddr *lsa; | 179 | len_and_sockaddr *lsa; |
180 | #if ENABLE_PING6 | 180 | #if ENABLE_PING6 |
@@ -302,8 +302,8 @@ void BUG_ping_globals_too_big(void); | |||
302 | 302 | ||
303 | /**************************************************************************/ | 303 | /**************************************************************************/ |
304 | 304 | ||
305 | static void print_stats_and_exit(int junk) ATTRIBUTE_NORETURN; | 305 | static void print_stats_and_exit(int junk) NORETURN; |
306 | static void print_stats_and_exit(int junk ATTRIBUTE_UNUSED) | 306 | static void print_stats_and_exit(int junk UNUSED_PARAM) |
307 | { | 307 | { |
308 | signal(SIGINT, SIG_IGN); | 308 | signal(SIGINT, SIG_IGN); |
309 | 309 | ||
@@ -366,7 +366,7 @@ static void sendping_tail(void (*sp)(int), const void *pkt, int size_pkt) | |||
366 | } | 366 | } |
367 | } | 367 | } |
368 | 368 | ||
369 | static void sendping4(int junk ATTRIBUTE_UNUSED) | 369 | static void sendping4(int junk UNUSED_PARAM) |
370 | { | 370 | { |
371 | /* +4 reserves a place for timestamp, which may end up sitting | 371 | /* +4 reserves a place for timestamp, which may end up sitting |
372 | * *after* packet. Saves one if() */ | 372 | * *after* packet. Saves one if() */ |
@@ -388,7 +388,7 @@ static void sendping4(int junk ATTRIBUTE_UNUSED) | |||
388 | sendping_tail(sendping4, pkt, datalen + ICMP_MINLEN); | 388 | sendping_tail(sendping4, pkt, datalen + ICMP_MINLEN); |
389 | } | 389 | } |
390 | #if ENABLE_PING6 | 390 | #if ENABLE_PING6 |
391 | static void sendping6(int junk ATTRIBUTE_UNUSED) | 391 | static void sendping6(int junk UNUSED_PARAM) |
392 | { | 392 | { |
393 | struct icmp6_hdr *pkt = alloca(datalen + sizeof(struct icmp6_hdr) + 4); | 393 | struct icmp6_hdr *pkt = alloca(datalen + sizeof(struct icmp6_hdr) + 4); |
394 | 394 | ||
@@ -714,7 +714,7 @@ static void ping(len_and_sockaddr *lsa) | |||
714 | } | 714 | } |
715 | 715 | ||
716 | int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 716 | int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
717 | int ping_main(int argc ATTRIBUTE_UNUSED, char **argv) | 717 | int ping_main(int argc UNUSED_PARAM, char **argv) |
718 | { | 718 | { |
719 | len_and_sockaddr *lsa; | 719 | len_and_sockaddr *lsa; |
720 | char *opt_c, *opt_s; | 720 | char *opt_c, *opt_s; |
diff --git a/networking/pscan.c b/networking/pscan.c index b332d7133..5fb6af0b3 100644 --- a/networking/pscan.c +++ b/networking/pscan.c | |||
@@ -31,7 +31,7 @@ static const char *port_name(unsigned port) | |||
31 | #define MONOTONIC_US() ((unsigned)monotonic_us()) | 31 | #define MONOTONIC_US() ((unsigned)monotonic_us()) |
32 | 32 | ||
33 | int pscan_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 33 | int pscan_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
34 | int pscan_main(int argc ATTRIBUTE_UNUSED, char **argv) | 34 | int pscan_main(int argc UNUSED_PARAM, char **argv) |
35 | { | 35 | { |
36 | const char *opt_max_port = "1024"; /* -P: default max port */ | 36 | const char *opt_max_port = "1024"; /* -P: default max port */ |
37 | const char *opt_min_port = "1"; /* -p: default min port */ | 37 | const char *opt_min_port = "1"; /* -p: default min port */ |
diff --git a/networking/route.c b/networking/route.c index 0146fa029..f467ed3fd 100644 --- a/networking/route.c +++ b/networking/route.c | |||
@@ -641,7 +641,7 @@ static const char tbl_verb[] ALIGN1 = | |||
641 | ; | 641 | ; |
642 | 642 | ||
643 | int route_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 643 | int route_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
644 | int route_main(int argc ATTRIBUTE_UNUSED, char **argv) | 644 | int route_main(int argc UNUSED_PARAM, char **argv) |
645 | { | 645 | { |
646 | unsigned opt; | 646 | unsigned opt; |
647 | int what; | 647 | int what; |
diff --git a/networking/sendmail.c b/networking/sendmail.c index b58055d39..93617388b 100644 --- a/networking/sendmail.c +++ b/networking/sendmail.c | |||
@@ -275,7 +275,7 @@ static char *parse_url(char *url, char **user, char **pass) | |||
275 | } | 275 | } |
276 | 276 | ||
277 | int sendgetmail_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 277 | int sendgetmail_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
278 | int sendgetmail_main(int argc ATTRIBUTE_UNUSED, char **argv) | 278 | int sendgetmail_main(int argc UNUSED_PARAM, char **argv) |
279 | { | 279 | { |
280 | llist_t *opt_recipients = NULL; | 280 | llist_t *opt_recipients = NULL; |
281 | llist_t *opt_attachments = NULL; | 281 | llist_t *opt_attachments = NULL; |
diff --git a/networking/slattach.c b/networking/slattach.c index 02ecb5e9f..52f7f3cff 100644 --- a/networking/slattach.c +++ b/networking/slattach.c | |||
@@ -64,7 +64,7 @@ static int set_termios_state_or_warn(struct termios *state) | |||
64 | * Go on after errors: we want to restore as many controlled ttys | 64 | * Go on after errors: we want to restore as many controlled ttys |
65 | * as possible. | 65 | * as possible. |
66 | */ | 66 | */ |
67 | static void restore_state_and_exit(int exitcode) ATTRIBUTE_NORETURN; | 67 | static void restore_state_and_exit(int exitcode) NORETURN; |
68 | static void restore_state_and_exit(int exitcode) | 68 | static void restore_state_and_exit(int exitcode) |
69 | { | 69 | { |
70 | struct termios state; | 70 | struct termios state; |
@@ -114,13 +114,13 @@ static void set_state(struct termios *state, int encap) | |||
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||
117 | static void sig_handler(int signo ATTRIBUTE_UNUSED) | 117 | static void sig_handler(int signo UNUSED_PARAM) |
118 | { | 118 | { |
119 | restore_state_and_exit(EXIT_SUCCESS); | 119 | restore_state_and_exit(EXIT_SUCCESS); |
120 | } | 120 | } |
121 | 121 | ||
122 | int slattach_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 122 | int slattach_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
123 | int slattach_main(int argc ATTRIBUTE_UNUSED, char **argv) | 123 | int slattach_main(int argc UNUSED_PARAM, char **argv) |
124 | { | 124 | { |
125 | /* Line discipline code table */ | 125 | /* Line discipline code table */ |
126 | static const char proto_names[] ALIGN1 = | 126 | static const char proto_names[] ALIGN1 = |
diff --git a/networking/tcpudp.c b/networking/tcpudp.c index 561d1324c..29408c5be 100644 --- a/networking/tcpudp.c +++ b/networking/tcpudp.c | |||
@@ -144,7 +144,7 @@ static void connection_status(void) | |||
144 | bb_error_msg("status %u/%u", cnum, cmax); | 144 | bb_error_msg("status %u/%u", cnum, cmax); |
145 | } | 145 | } |
146 | 146 | ||
147 | static void sig_child_handler(int sig ATTRIBUTE_UNUSED) | 147 | static void sig_child_handler(int sig UNUSED_PARAM) |
148 | { | 148 | { |
149 | int wstat; | 149 | int wstat; |
150 | int pid; | 150 | int pid; |
@@ -162,7 +162,7 @@ static void sig_child_handler(int sig ATTRIBUTE_UNUSED) | |||
162 | } | 162 | } |
163 | 163 | ||
164 | int tcpudpsvd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 164 | int tcpudpsvd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
165 | int tcpudpsvd_main(int argc ATTRIBUTE_UNUSED, char **argv) | 165 | int tcpudpsvd_main(int argc UNUSED_PARAM, char **argv) |
166 | { | 166 | { |
167 | char *str_C, *str_t; | 167 | char *str_C, *str_t; |
168 | char *user; | 168 | char *user; |
diff --git a/networking/telnet.c b/networking/telnet.c index 3a06c167c..aaaa2648f 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
@@ -101,7 +101,7 @@ static void iacflush(void) | |||
101 | 101 | ||
102 | #define write_str(fd, str) write(fd, str, sizeof(str) - 1) | 102 | #define write_str(fd, str) write(fd, str, sizeof(str) - 1) |
103 | 103 | ||
104 | static void doexit(int ev) ATTRIBUTE_NORETURN; | 104 | static void doexit(int ev) NORETURN; |
105 | static void doexit(int ev) | 105 | static void doexit(int ev) |
106 | { | 106 | { |
107 | cookmode(); | 107 | cookmode(); |
diff --git a/networking/telnetd.c b/networking/telnetd.c index 3660d788f..22ecb3ca8 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c | |||
@@ -330,7 +330,7 @@ free_session(struct tsession *ts) | |||
330 | 330 | ||
331 | #endif | 331 | #endif |
332 | 332 | ||
333 | static void handle_sigchld(int sig ATTRIBUTE_UNUSED) | 333 | static void handle_sigchld(int sig UNUSED_PARAM) |
334 | { | 334 | { |
335 | pid_t pid; | 335 | pid_t pid; |
336 | struct tsession *ts; | 336 | struct tsession *ts; |
@@ -352,7 +352,7 @@ static void handle_sigchld(int sig ATTRIBUTE_UNUSED) | |||
352 | } | 352 | } |
353 | 353 | ||
354 | int telnetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 354 | int telnetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
355 | int telnetd_main(int argc ATTRIBUTE_UNUSED, char **argv) | 355 | int telnetd_main(int argc UNUSED_PARAM, char **argv) |
356 | { | 356 | { |
357 | fd_set rdfdset, wrfdset; | 357 | fd_set rdfdset, wrfdset; |
358 | unsigned opt; | 358 | unsigned opt; |
diff --git a/networking/tftp.c b/networking/tftp.c index c61cde9d5..d09a6eba5 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -555,7 +555,7 @@ static int tftp_protocol( | |||
555 | #if ENABLE_TFTP | 555 | #if ENABLE_TFTP |
556 | 556 | ||
557 | int tftp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 557 | int tftp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
558 | int tftp_main(int argc ATTRIBUTE_UNUSED, char **argv) | 558 | int tftp_main(int argc UNUSED_PARAM, char **argv) |
559 | { | 559 | { |
560 | len_and_sockaddr *peer_lsa; | 560 | len_and_sockaddr *peer_lsa; |
561 | const char *local_file = NULL; | 561 | const char *local_file = NULL; |
@@ -640,7 +640,7 @@ static len_and_sockaddr *get_sock_lsa(int s) | |||
640 | } | 640 | } |
641 | 641 | ||
642 | int tftpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 642 | int tftpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
643 | int tftpd_main(int argc ATTRIBUTE_UNUSED, char **argv) | 643 | int tftpd_main(int argc UNUSED_PARAM, char **argv) |
644 | { | 644 | { |
645 | len_and_sockaddr *our_lsa; | 645 | len_and_sockaddr *our_lsa; |
646 | len_and_sockaddr *peer_lsa; | 646 | len_and_sockaddr *peer_lsa; |
diff --git a/networking/traceroute.c b/networking/traceroute.c index 6a5373469..f16fc792f 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c | |||
@@ -273,7 +273,7 @@ typedef struct outdata { | |||
273 | unsigned char seq; /* sequence number of this packet */ | 273 | unsigned char seq; /* sequence number of this packet */ |
274 | unsigned char ttl; /* ttl packet left with */ | 274 | unsigned char ttl; /* ttl packet left with */ |
275 | // UNUSED. Retaining to have the same packet size. | 275 | // UNUSED. Retaining to have the same packet size. |
276 | struct timeval tv_UNUSED ATTRIBUTE_PACKED; /* time packet left */ | 276 | struct timeval tv_UNUSED PACKED; /* time packet left */ |
277 | } outdata_t; | 277 | } outdata_t; |
278 | 278 | ||
279 | struct IFADDRLIST { | 279 | struct IFADDRLIST { |
diff --git a/networking/udhcp/arpping.c b/networking/udhcp/arpping.c index a8a458468..44815ad74 100644 --- a/networking/udhcp/arpping.c +++ b/networking/udhcp/arpping.c | |||
@@ -30,7 +30,7 @@ struct arpMsg { | |||
30 | uint8_t tHaddr[6]; /* 20 target's hardware address */ | 30 | uint8_t tHaddr[6]; /* 20 target's hardware address */ |
31 | uint8_t tInaddr[4]; /* 26 target's IP address */ | 31 | uint8_t tInaddr[4]; /* 26 target's IP address */ |
32 | uint8_t pad[18]; /* 2a pad for min. ethernet payload (60 bytes) */ | 32 | uint8_t pad[18]; /* 2a pad for min. ethernet payload (60 bytes) */ |
33 | } ATTRIBUTE_PACKED; | 33 | } PACKED; |
34 | 34 | ||
35 | enum { | 35 | enum { |
36 | ARP_MSG_SIZE = 0x2a | 36 | ARP_MSG_SIZE = 0x2a |
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index bf0ecc7b1..0f3b79647 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h | |||
@@ -43,13 +43,13 @@ struct dhcpMessage { | |||
43 | uint8_t file[128]; | 43 | uint8_t file[128]; |
44 | uint32_t cookie; | 44 | uint32_t cookie; |
45 | uint8_t options[DHCP_OPTIONS_BUFSIZE + CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS]; | 45 | uint8_t options[DHCP_OPTIONS_BUFSIZE + CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS]; |
46 | } ATTRIBUTE_PACKED; | 46 | } PACKED; |
47 | 47 | ||
48 | struct udp_dhcp_packet { | 48 | struct udp_dhcp_packet { |
49 | struct iphdr ip; | 49 | struct iphdr ip; |
50 | struct udphdr udp; | 50 | struct udphdr udp; |
51 | struct dhcpMessage data; | 51 | struct dhcpMessage data; |
52 | } ATTRIBUTE_PACKED; | 52 | } PACKED; |
53 | 53 | ||
54 | /* Let's see whether compiler understood us right */ | 54 | /* Let's see whether compiler understood us right */ |
55 | struct BUG_bad_sizeof_struct_udp_dhcp_packet { | 55 | struct BUG_bad_sizeof_struct_udp_dhcp_packet { |
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index d2138dd45..5caa00c83 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -123,7 +123,7 @@ static uint8_t* alloc_dhcp_option(int code, const char *str, int extra) | |||
123 | 123 | ||
124 | 124 | ||
125 | int udhcpc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 125 | int udhcpc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
126 | int udhcpc_main(int argc ATTRIBUTE_UNUSED, char **argv) | 126 | int udhcpc_main(int argc UNUSED_PARAM, char **argv) |
127 | { | 127 | { |
128 | uint8_t *temp, *message; | 128 | uint8_t *temp, *message; |
129 | char *str_c, *str_V, *str_h, *str_F, *str_r; | 129 | char *str_c, *str_V, *str_h, *str_F, *str_r; |
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index a6264ad2f..0cd6b9d50 100644 --- a/networking/udhcp/dhcpd.c +++ b/networking/udhcp/dhcpd.c | |||
@@ -23,7 +23,7 @@ struct dhcpOfferedAddr *leases; | |||
23 | 23 | ||
24 | 24 | ||
25 | int udhcpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 25 | int udhcpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
26 | int udhcpd_main(int argc ATTRIBUTE_UNUSED, char **argv) | 26 | int udhcpd_main(int argc UNUSED_PARAM, char **argv) |
27 | { | 27 | { |
28 | fd_set rfds; | 28 | fd_set rfds; |
29 | struct timeval tv; | 29 | struct timeval tv; |
diff --git a/networking/udhcp/dhcprelay.c b/networking/udhcp/dhcprelay.c index 08fb733d7..90ecf4831 100644 --- a/networking/udhcp/dhcprelay.c +++ b/networking/udhcp/dhcprelay.c | |||
@@ -236,7 +236,7 @@ static void pass_back(struct dhcpMessage *p, int packet_len, int *fds) | |||
236 | } | 236 | } |
237 | 237 | ||
238 | static void dhcprelay_loop(int *fds, int num_sockets, int max_socket, char **clients, | 238 | static void dhcprelay_loop(int *fds, int num_sockets, int max_socket, char **clients, |
239 | struct sockaddr_in *server_addr, uint32_t gw_ip) ATTRIBUTE_NORETURN; | 239 | struct sockaddr_in *server_addr, uint32_t gw_ip) NORETURN; |
240 | static void dhcprelay_loop(int *fds, int num_sockets, int max_socket, char **clients, | 240 | static void dhcprelay_loop(int *fds, int num_sockets, int max_socket, char **clients, |
241 | struct sockaddr_in *server_addr, uint32_t gw_ip) | 241 | struct sockaddr_in *server_addr, uint32_t gw_ip) |
242 | { | 242 | { |
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index c98005f13..3e193903d 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c | |||
@@ -7,7 +7,7 @@ | |||
7 | #include "dhcpd.h" | 7 | #include "dhcpd.h" |
8 | 8 | ||
9 | int dumpleases_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 9 | int dumpleases_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
10 | int dumpleases_main(int argc ATTRIBUTE_UNUSED, char **argv) | 10 | int dumpleases_main(int argc UNUSED_PARAM, char **argv) |
11 | { | 11 | { |
12 | int fd; | 12 | int fd; |
13 | int i; | 13 | int i; |
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c index 58498f9ef..eaa50b807 100644 --- a/networking/udhcp/files.c +++ b/networking/udhcp/files.c | |||
@@ -155,7 +155,7 @@ static int read_opt(const char *const_line, void *arg) | |||
155 | char *line; | 155 | char *line; |
156 | const struct dhcp_option *option; | 156 | const struct dhcp_option *option; |
157 | int retval, length, idx; | 157 | int retval, length, idx; |
158 | char buffer[8] __attribute__((aligned(4))); | 158 | char buffer[8] ALIGNED(4); |
159 | uint16_t *result_u16 = (uint16_t *) buffer; | 159 | uint16_t *result_u16 = (uint16_t *) buffer; |
160 | uint32_t *result_u32 = (uint32_t *) buffer; | 160 | uint32_t *result_u32 = (uint32_t *) buffer; |
161 | 161 | ||
diff --git a/networking/wget.c b/networking/wget.c index 8606b9b38..d782cc4fe 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -188,7 +188,7 @@ static void progressmeter(int flag) | |||
188 | */ | 188 | */ |
189 | #else /* FEATURE_WGET_STATUSBAR */ | 189 | #else /* FEATURE_WGET_STATUSBAR */ |
190 | 190 | ||
191 | static ALWAYS_INLINE void progressmeter(int flag ATTRIBUTE_UNUSED) { } | 191 | static ALWAYS_INLINE void progressmeter(int flag UNUSED_PARAM) { } |
192 | 192 | ||
193 | #endif | 193 | #endif |
194 | 194 | ||
@@ -386,7 +386,7 @@ static char *gethdr(char *buf, size_t bufsiz, FILE *fp /*, int *istrunc*/) | |||
386 | 386 | ||
387 | 387 | ||
388 | int wget_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 388 | int wget_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
389 | int wget_main(int argc ATTRIBUTE_UNUSED, char **argv) | 389 | int wget_main(int argc UNUSED_PARAM, char **argv) |
390 | { | 390 | { |
391 | char buf[512]; | 391 | char buf[512]; |
392 | struct host_info server, target; | 392 | struct host_info server, target; |
diff --git a/networking/zcip.c b/networking/zcip.c index fccb1a466..221edd322 100644 --- a/networking/zcip.c +++ b/networking/zcip.c | |||
@@ -39,7 +39,7 @@ | |||
39 | struct arp_packet { | 39 | struct arp_packet { |
40 | struct ether_header eth; | 40 | struct ether_header eth; |
41 | struct ether_arp arp; | 41 | struct ether_arp arp; |
42 | } ATTRIBUTE_PACKED; | 42 | } PACKED; |
43 | 43 | ||
44 | enum { | 44 | enum { |
45 | /* 169.254.0.0 */ | 45 | /* 169.254.0.0 */ |
diff --git a/printutils/lpd.c b/printutils/lpd.c index 11920d211..79119a47f 100644 --- a/printutils/lpd.c +++ b/printutils/lpd.c | |||
@@ -95,7 +95,7 @@ static char *xmalloc_read_stdin(void) | |||
95 | } | 95 | } |
96 | 96 | ||
97 | int lpd_main(int argc, char *argv[]) MAIN_EXTERNALLY_VISIBLE; | 97 | int lpd_main(int argc, char *argv[]) MAIN_EXTERNALLY_VISIBLE; |
98 | int lpd_main(int argc ATTRIBUTE_UNUSED, char *argv[]) | 98 | int lpd_main(int argc UNUSED_PARAM, char *argv[]) |
99 | { | 99 | { |
100 | int spooling = spooling; // for compiler | 100 | int spooling = spooling; // for compiler |
101 | char *s, *queue; | 101 | char *s, *queue; |
diff --git a/printutils/lpr.c b/printutils/lpr.c index d0bf5873e..4f3b0247c 100644 --- a/printutils/lpr.c +++ b/printutils/lpr.c | |||
@@ -42,7 +42,7 @@ static void get_response_or_say_and_die(int fd, const char *errmsg) | |||
42 | } | 42 | } |
43 | 43 | ||
44 | int lpqr_main(int argc, char *argv[]) MAIN_EXTERNALLY_VISIBLE; | 44 | int lpqr_main(int argc, char *argv[]) MAIN_EXTERNALLY_VISIBLE; |
45 | int lpqr_main(int argc ATTRIBUTE_UNUSED, char *argv[]) | 45 | int lpqr_main(int argc UNUSED_PARAM, char *argv[]) |
46 | { | 46 | { |
47 | enum { | 47 | enum { |
48 | OPT_P = 1 << 0, // -P queue[@host[:port]]. If no -P is given use $PRINTER, then "lp@localhost:515" | 48 | OPT_P = 1 << 0, // -P queue[@host[:port]]. If no -P is given use $PRINTER, then "lp@localhost:515" |
diff --git a/procps/fuser.c b/procps/fuser.c index 55f7917a0..8afa958b6 100644 --- a/procps/fuser.c +++ b/procps/fuser.c | |||
@@ -269,7 +269,7 @@ static int kill_pid_list(pid_list *plist, int sig) | |||
269 | } | 269 | } |
270 | 270 | ||
271 | int fuser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 271 | int fuser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
272 | int fuser_main(int argc ATTRIBUTE_UNUSED, char **argv) | 272 | int fuser_main(int argc UNUSED_PARAM, char **argv) |
273 | { | 273 | { |
274 | pid_list *plist; | 274 | pid_list *plist; |
275 | inode_list *ilist; | 275 | inode_list *ilist; |
diff --git a/procps/nmeter.c b/procps/nmeter.c index 205cb8251..8cff0b918 100644 --- a/procps/nmeter.c +++ b/procps/nmeter.c | |||
@@ -274,7 +274,7 @@ typedef struct a { \ | |||
274 | S_STAT(s_stat) | 274 | S_STAT(s_stat) |
275 | S_STAT_END(s_stat) | 275 | S_STAT_END(s_stat) |
276 | 276 | ||
277 | static void collect_literal(s_stat *s ATTRIBUTE_UNUSED) | 277 | static void collect_literal(s_stat *s UNUSED_PARAM) |
278 | { | 278 | { |
279 | } | 279 | } |
280 | 280 | ||
@@ -293,7 +293,7 @@ static s_stat* init_delay(const char *param) | |||
293 | return NULL; | 293 | return NULL; |
294 | } | 294 | } |
295 | 295 | ||
296 | static s_stat* init_cr(const char *param ATTRIBUTE_UNUSED) | 296 | static s_stat* init_cr(const char *param UNUSED_PARAM) |
297 | { | 297 | { |
298 | final_str = "\r"; | 298 | final_str = "\r"; |
299 | return (s_stat*)0; | 299 | return (s_stat*)0; |
@@ -435,7 +435,7 @@ static void collect_ctx(ctx_stat *s) | |||
435 | scale(data[0] - old); | 435 | scale(data[0] - old); |
436 | } | 436 | } |
437 | 437 | ||
438 | static s_stat* init_ctx(const char *param ATTRIBUTE_UNUSED) | 438 | static s_stat* init_ctx(const char *param UNUSED_PARAM) |
439 | { | 439 | { |
440 | ctx_stat *s = xzalloc(sizeof(*s)); | 440 | ctx_stat *s = xzalloc(sizeof(*s)); |
441 | s->collect = collect_ctx; | 441 | s->collect = collect_ctx; |
@@ -477,7 +477,7 @@ static void collect_blk(blk_stat *s) | |||
477 | scale(data[1]*512); | 477 | scale(data[1]*512); |
478 | } | 478 | } |
479 | 479 | ||
480 | static s_stat* init_blk(const char *param ATTRIBUTE_UNUSED) | 480 | static s_stat* init_blk(const char *param UNUSED_PARAM) |
481 | { | 481 | { |
482 | blk_stat *s = xzalloc(sizeof(*s)); | 482 | blk_stat *s = xzalloc(sizeof(*s)); |
483 | s->collect = collect_blk; | 483 | s->collect = collect_blk; |
@@ -490,7 +490,7 @@ S_STAT(fork_stat) | |||
490 | ullong old; | 490 | ullong old; |
491 | S_STAT_END(fork_stat) | 491 | S_STAT_END(fork_stat) |
492 | 492 | ||
493 | static void collect_thread_nr(fork_stat *s ATTRIBUTE_UNUSED) | 493 | static void collect_thread_nr(fork_stat *s UNUSED_PARAM) |
494 | { | 494 | { |
495 | ullong data[1]; | 495 | ullong data[1]; |
496 | 496 | ||
@@ -657,7 +657,7 @@ static s_stat* init_mem(const char *param) | |||
657 | S_STAT(swp_stat) | 657 | S_STAT(swp_stat) |
658 | S_STAT_END(swp_stat) | 658 | S_STAT_END(swp_stat) |
659 | 659 | ||
660 | static void collect_swp(swp_stat *s ATTRIBUTE_UNUSED) | 660 | static void collect_swp(swp_stat *s UNUSED_PARAM) |
661 | { | 661 | { |
662 | ullong s_total[1]; | 662 | ullong s_total[1]; |
663 | ullong s_free[1]; | 663 | ullong s_free[1]; |
@@ -670,7 +670,7 @@ static void collect_swp(swp_stat *s ATTRIBUTE_UNUSED) | |||
670 | scale((s_total[0]-s_free[0]) << 10); | 670 | scale((s_total[0]-s_free[0]) << 10); |
671 | } | 671 | } |
672 | 672 | ||
673 | static s_stat* init_swp(const char *param ATTRIBUTE_UNUSED) | 673 | static s_stat* init_swp(const char *param UNUSED_PARAM) |
674 | { | 674 | { |
675 | swp_stat *s = xzalloc(sizeof(*s)); | 675 | swp_stat *s = xzalloc(sizeof(*s)); |
676 | s->collect = collect_swp; | 676 | s->collect = collect_swp; |
@@ -681,7 +681,7 @@ static s_stat* init_swp(const char *param ATTRIBUTE_UNUSED) | |||
681 | S_STAT(fd_stat) | 681 | S_STAT(fd_stat) |
682 | S_STAT_END(fd_stat) | 682 | S_STAT_END(fd_stat) |
683 | 683 | ||
684 | static void collect_fd(fd_stat *s ATTRIBUTE_UNUSED) | 684 | static void collect_fd(fd_stat *s UNUSED_PARAM) |
685 | { | 685 | { |
686 | ullong data[2]; | 686 | ullong data[2]; |
687 | 687 | ||
@@ -693,7 +693,7 @@ static void collect_fd(fd_stat *s ATTRIBUTE_UNUSED) | |||
693 | scale(data[0] - data[1]); | 693 | scale(data[0] - data[1]); |
694 | } | 694 | } |
695 | 695 | ||
696 | static s_stat* init_fd(const char *param ATTRIBUTE_UNUSED) | 696 | static s_stat* init_fd(const char *param UNUSED_PARAM) |
697 | { | 697 | { |
698 | fd_stat *s = xzalloc(sizeof(*s)); | 698 | fd_stat *s = xzalloc(sizeof(*s)); |
699 | s->collect = collect_fd; | 699 | s->collect = collect_fd; |
diff --git a/procps/pgrep.c b/procps/pgrep.c index 336fa84ba..7b3cd8e50 100644 --- a/procps/pgrep.c +++ b/procps/pgrep.c | |||
@@ -43,7 +43,7 @@ static void act(unsigned pid, char *cmd, int signo, unsigned opt) | |||
43 | } | 43 | } |
44 | 44 | ||
45 | int pgrep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 45 | int pgrep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
46 | int pgrep_main(int argc ATTRIBUTE_UNUSED, char **argv) | 46 | int pgrep_main(int argc UNUSED_PARAM, char **argv) |
47 | { | 47 | { |
48 | unsigned pid = getpid(); | 48 | unsigned pid = getpid(); |
49 | int signo = SIGTERM; | 49 | int signo = SIGTERM; |
diff --git a/procps/pidof.c b/procps/pidof.c index 8ed5a2155..2519473e8 100644 --- a/procps/pidof.c +++ b/procps/pidof.c | |||
@@ -17,7 +17,7 @@ enum { | |||
17 | }; | 17 | }; |
18 | 18 | ||
19 | int pidof_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 19 | int pidof_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
20 | int pidof_main(int argc ATTRIBUTE_UNUSED, char **argv) | 20 | int pidof_main(int argc UNUSED_PARAM, char **argv) |
21 | { | 21 | { |
22 | unsigned first = 1; | 22 | unsigned first = 1; |
23 | unsigned opt; | 23 | unsigned opt; |
diff --git a/procps/ps.c b/procps/ps.c index cfca851cf..c5dff1814 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -422,7 +422,7 @@ static void format_process(const procps_status_t *ps) | |||
422 | } | 422 | } |
423 | 423 | ||
424 | int ps_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 424 | int ps_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
425 | int ps_main(int argc ATTRIBUTE_UNUSED, char **argv) | 425 | int ps_main(int argc UNUSED_PARAM, char **argv) |
426 | { | 426 | { |
427 | procps_status_t *p; | 427 | procps_status_t *p; |
428 | llist_t* opt_o = NULL; | 428 | llist_t* opt_o = NULL; |
@@ -483,7 +483,7 @@ int ps_main(int argc ATTRIBUTE_UNUSED, char **argv) | |||
483 | 483 | ||
484 | 484 | ||
485 | int ps_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 485 | int ps_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
486 | int ps_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 486 | int ps_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
487 | { | 487 | { |
488 | procps_status_t *p = NULL; | 488 | procps_status_t *p = NULL; |
489 | int len; | 489 | int len; |
diff --git a/procps/renice.c b/procps/renice.c index d2dcf152c..4c309e9d1 100644 --- a/procps/renice.c +++ b/procps/renice.c | |||
@@ -27,7 +27,7 @@ void BUG_bad_PRIO_PGRP(void); | |||
27 | void BUG_bad_PRIO_USER(void); | 27 | void BUG_bad_PRIO_USER(void); |
28 | 28 | ||
29 | int renice_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 29 | int renice_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
30 | int renice_main(int argc ATTRIBUTE_UNUSED, char **argv) | 30 | int renice_main(int argc UNUSED_PARAM, char **argv) |
31 | { | 31 | { |
32 | static const char Xetpriority_msg[] ALIGN1 = "%cetpriority"; | 32 | static const char Xetpriority_msg[] ALIGN1 = "%cetpriority"; |
33 | 33 | ||
diff --git a/procps/sysctl.c b/procps/sysctl.c index 1995382ad..3607a2364 100644 --- a/procps/sysctl.c +++ b/procps/sysctl.c | |||
@@ -57,7 +57,7 @@ enum { | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | int sysctl_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 59 | int sysctl_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
60 | int sysctl_main(int argc ATTRIBUTE_UNUSED, char **argv) | 60 | int sysctl_main(int argc UNUSED_PARAM, char **argv) |
61 | { | 61 | { |
62 | int retval; | 62 | int retval; |
63 | int opt; | 63 | int opt; |
diff --git a/procps/top.c b/procps/top.c index 0e1b333a1..e13cd1521 100644 --- a/procps/top.c +++ b/procps/top.c | |||
@@ -519,7 +519,7 @@ static void reset_term(void) | |||
519 | } | 519 | } |
520 | } | 520 | } |
521 | 521 | ||
522 | static void sig_catcher(int sig ATTRIBUTE_UNUSED) | 522 | static void sig_catcher(int sig UNUSED_PARAM) |
523 | { | 523 | { |
524 | reset_term(); | 524 | reset_term(); |
525 | exit(EXIT_FAILURE); | 525 | exit(EXIT_FAILURE); |
@@ -739,7 +739,7 @@ enum { | |||
739 | }; | 739 | }; |
740 | 740 | ||
741 | int top_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 741 | int top_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
742 | int top_main(int argc ATTRIBUTE_UNUSED, char **argv) | 742 | int top_main(int argc UNUSED_PARAM, char **argv) |
743 | { | 743 | { |
744 | int count; | 744 | int count; |
745 | int iterations; | 745 | int iterations; |
diff --git a/procps/uptime.c b/procps/uptime.c index b729055a5..d9aa1d037 100644 --- a/procps/uptime.c +++ b/procps/uptime.c | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | 27 | ||
28 | int uptime_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 28 | int uptime_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
29 | int uptime_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 29 | int uptime_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
30 | { | 30 | { |
31 | int updays, uphours, upminutes; | 31 | int updays, uphours, upminutes; |
32 | struct sysinfo info; | 32 | struct sysinfo info; |
diff --git a/procps/watch.c b/procps/watch.c index 7d8e0de1f..5fd051072 100644 --- a/procps/watch.c +++ b/procps/watch.c | |||
@@ -24,7 +24,7 @@ | |||
24 | // (procps 3.x and procps 2.x are forks, not newer/older versions of the same) | 24 | // (procps 3.x and procps 2.x are forks, not newer/older versions of the same) |
25 | 25 | ||
26 | int watch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 26 | int watch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
27 | int watch_main(int argc ATTRIBUTE_UNUSED, char **argv) | 27 | int watch_main(int argc UNUSED_PARAM, char **argv) |
28 | { | 28 | { |
29 | unsigned opt; | 29 | unsigned opt; |
30 | unsigned period = 2; | 30 | unsigned period = 2; |
diff --git a/runit/chpst.c b/runit/chpst.c index 4de53f051..899a4eef0 100644 --- a/runit/chpst.c +++ b/runit/chpst.c | |||
@@ -282,13 +282,13 @@ static void slimit(void) | |||
282 | } | 282 | } |
283 | 283 | ||
284 | /* argv[0] */ | 284 | /* argv[0] */ |
285 | static void setuidgid(int, char **) ATTRIBUTE_NORETURN; | 285 | static void setuidgid(int, char **) NORETURN; |
286 | static void envuidgid(int, char **) ATTRIBUTE_NORETURN; | 286 | static void envuidgid(int, char **) NORETURN; |
287 | static void envdir(int, char **) ATTRIBUTE_NORETURN; | 287 | static void envdir(int, char **) NORETURN; |
288 | static void softlimit(int, char **) ATTRIBUTE_NORETURN; | 288 | static void softlimit(int, char **) NORETURN; |
289 | 289 | ||
290 | int chpst_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 290 | int chpst_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
291 | int chpst_main(int argc ATTRIBUTE_UNUSED, char **argv) | 291 | int chpst_main(int argc UNUSED_PARAM, char **argv) |
292 | { | 292 | { |
293 | INIT_G(); | 293 | INIT_G(); |
294 | 294 | ||
@@ -347,7 +347,7 @@ int chpst_main(int argc ATTRIBUTE_UNUSED, char **argv) | |||
347 | bb_perror_msg_and_die("exec %s", argv[0]); | 347 | bb_perror_msg_and_die("exec %s", argv[0]); |
348 | } | 348 | } |
349 | 349 | ||
350 | static void setuidgid(int argc ATTRIBUTE_UNUSED, char **argv) | 350 | static void setuidgid(int argc UNUSED_PARAM, char **argv) |
351 | { | 351 | { |
352 | const char *account; | 352 | const char *account; |
353 | 353 | ||
@@ -359,7 +359,7 @@ static void setuidgid(int argc ATTRIBUTE_UNUSED, char **argv) | |||
359 | bb_perror_msg_and_die("exec %s", argv[0]); | 359 | bb_perror_msg_and_die("exec %s", argv[0]); |
360 | } | 360 | } |
361 | 361 | ||
362 | static void envuidgid(int argc ATTRIBUTE_UNUSED, char **argv) | 362 | static void envuidgid(int argc UNUSED_PARAM, char **argv) |
363 | { | 363 | { |
364 | const char *account; | 364 | const char *account; |
365 | 365 | ||
@@ -371,7 +371,7 @@ static void envuidgid(int argc ATTRIBUTE_UNUSED, char **argv) | |||
371 | bb_perror_msg_and_die("exec %s", argv[0]); | 371 | bb_perror_msg_and_die("exec %s", argv[0]); |
372 | } | 372 | } |
373 | 373 | ||
374 | static void envdir(int argc ATTRIBUTE_UNUSED, char **argv) | 374 | static void envdir(int argc UNUSED_PARAM, char **argv) |
375 | { | 375 | { |
376 | const char *dir; | 376 | const char *dir; |
377 | 377 | ||
@@ -383,7 +383,7 @@ static void envdir(int argc ATTRIBUTE_UNUSED, char **argv) | |||
383 | bb_perror_msg_and_die("exec %s", argv[0]); | 383 | bb_perror_msg_and_die("exec %s", argv[0]); |
384 | } | 384 | } |
385 | 385 | ||
386 | static void softlimit(int argc ATTRIBUTE_UNUSED, char **argv) | 386 | static void softlimit(int argc UNUSED_PARAM, char **argv) |
387 | { | 387 | { |
388 | char *a,*c,*d,*f,*l,*m,*o,*p,*r,*s,*t; | 388 | char *a,*c,*d,*f,*l,*m,*o,*p,*r,*s,*t; |
389 | getopt32(argv, "+a:c:d:f:l:m:o:p:r:s:t:", | 389 | getopt32(argv, "+a:c:d:f:l:m:o:p:r:s:t:", |
diff --git a/runit/runit_lib.h b/runit/runit_lib.h index c94e61cf2..b0b6dc220 100644 --- a/runit/runit_lib.h +++ b/runit/runit_lib.h | |||
@@ -88,9 +88,9 @@ extern unsigned pmatch(const char *, const char *, unsigned); | |||
88 | * runsv / supervise / sv stuff | 88 | * runsv / supervise / sv stuff |
89 | */ | 89 | */ |
90 | typedef struct svstatus_t { | 90 | typedef struct svstatus_t { |
91 | uint64_t time_be64 ATTRIBUTE_PACKED; | 91 | uint64_t time_be64 PACKED; |
92 | uint32_t time_nsec_be32 ATTRIBUTE_PACKED; | 92 | uint32_t time_nsec_be32 PACKED; |
93 | uint32_t pid_le32 ATTRIBUTE_PACKED; | 93 | uint32_t pid_le32 PACKED; |
94 | uint8_t paused; | 94 | uint8_t paused; |
95 | uint8_t want; | 95 | uint8_t want; |
96 | uint8_t got_term; | 96 | uint8_t got_term; |
diff --git a/runit/runsv.c b/runit/runsv.c index 6981fa774..bd0f3dcc2 100644 --- a/runit/runsv.c +++ b/runit/runsv.c | |||
@@ -127,12 +127,12 @@ static void warn_cannot(const char *m) | |||
127 | bb_perror_msg("%s: warning: cannot %s", dir, m); | 127 | bb_perror_msg("%s: warning: cannot %s", dir, m); |
128 | } | 128 | } |
129 | 129 | ||
130 | static void s_child(int sig_no ATTRIBUTE_UNUSED) | 130 | static void s_child(int sig_no UNUSED_PARAM) |
131 | { | 131 | { |
132 | write(selfpipe.wr, "", 1); | 132 | write(selfpipe.wr, "", 1); |
133 | } | 133 | } |
134 | 134 | ||
135 | static void s_term(int sig_no ATTRIBUTE_UNUSED) | 135 | static void s_term(int sig_no UNUSED_PARAM) |
136 | { | 136 | { |
137 | sigterm = 1; | 137 | sigterm = 1; |
138 | write(selfpipe.wr, "", 1); /* XXX */ | 138 | write(selfpipe.wr, "", 1); /* XXX */ |
@@ -434,7 +434,7 @@ static int ctrl(struct svdir *s, char c) | |||
434 | } | 434 | } |
435 | 435 | ||
436 | int runsv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 436 | int runsv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
437 | int runsv_main(int argc ATTRIBUTE_UNUSED, char **argv) | 437 | int runsv_main(int argc UNUSED_PARAM, char **argv) |
438 | { | 438 | { |
439 | struct stat s; | 439 | struct stat s; |
440 | int fd; | 440 | int fd; |
diff --git a/runit/runsvdir.c b/runit/runsvdir.c index df6b8869d..aaa4c470c 100644 --- a/runit/runsvdir.c +++ b/runit/runsvdir.c | |||
@@ -89,11 +89,11 @@ static void warnx(const char *m1) | |||
89 | warn3x(m1, "", ""); | 89 | warn3x(m1, "", ""); |
90 | } | 90 | } |
91 | 91 | ||
92 | static void s_term(int sig_no ATTRIBUTE_UNUSED) | 92 | static void s_term(int sig_no UNUSED_PARAM) |
93 | { | 93 | { |
94 | exitsoon = 1; | 94 | exitsoon = 1; |
95 | } | 95 | } |
96 | static void s_hangup(int sig_no ATTRIBUTE_UNUSED) | 96 | static void s_hangup(int sig_no UNUSED_PARAM) |
97 | { | 97 | { |
98 | exitsoon = 2; | 98 | exitsoon = 2; |
99 | } | 99 | } |
@@ -229,7 +229,7 @@ static int setup_log(void) | |||
229 | } | 229 | } |
230 | 230 | ||
231 | int runsvdir_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 231 | int runsvdir_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
232 | int runsvdir_main(int argc ATTRIBUTE_UNUSED, char **argv) | 232 | int runsvdir_main(int argc UNUSED_PARAM, char **argv) |
233 | { | 233 | { |
234 | struct stat s; | 234 | struct stat s; |
235 | dev_t last_dev = last_dev; /* for gcc */ | 235 | dev_t last_dev = last_dev; /* for gcc */ |
diff --git a/runit/sv.c b/runit/sv.c index d5a9bd9cf..1b92b9a23 100644 --- a/runit/sv.c +++ b/runit/sv.c | |||
@@ -176,7 +176,7 @@ struct globals { | |||
176 | #define INIT_G() do { } while (0) | 176 | #define INIT_G() do { } while (0) |
177 | 177 | ||
178 | 178 | ||
179 | static void fatal_cannot(const char *m1) ATTRIBUTE_NORETURN; | 179 | static void fatal_cannot(const char *m1) NORETURN; |
180 | static void fatal_cannot(const char *m1) | 180 | static void fatal_cannot(const char *m1) |
181 | { | 181 | { |
182 | bb_perror_msg("fatal: cannot %s", m1); | 182 | bb_perror_msg("fatal: cannot %s", m1); |
@@ -293,7 +293,7 @@ static unsigned svstatus_print(const char *m) | |||
293 | return pid ? 1 : 2; | 293 | return pid ? 1 : 2; |
294 | } | 294 | } |
295 | 295 | ||
296 | static int status(const char *unused ATTRIBUTE_UNUSED) | 296 | static int status(const char *unused UNUSED_PARAM) |
297 | { | 297 | { |
298 | int r; | 298 | int r; |
299 | 299 | ||
diff --git a/runit/svlogd.c b/runit/svlogd.c index bfb97166f..66b96b8de 100644 --- a/runit/svlogd.c +++ b/runit/svlogd.c | |||
@@ -788,14 +788,14 @@ static int buffer_pread(/*int fd, */char *s, unsigned len) | |||
788 | return i; | 788 | return i; |
789 | } | 789 | } |
790 | 790 | ||
791 | static void sig_term_handler(int sig_no ATTRIBUTE_UNUSED) | 791 | static void sig_term_handler(int sig_no UNUSED_PARAM) |
792 | { | 792 | { |
793 | if (verbose) | 793 | if (verbose) |
794 | bb_error_msg(INFO"sig%s received", "term"); | 794 | bb_error_msg(INFO"sig%s received", "term"); |
795 | exitasap = 1; | 795 | exitasap = 1; |
796 | } | 796 | } |
797 | 797 | ||
798 | static void sig_child_handler(int sig_no ATTRIBUTE_UNUSED) | 798 | static void sig_child_handler(int sig_no UNUSED_PARAM) |
799 | { | 799 | { |
800 | int pid, l; | 800 | int pid, l; |
801 | 801 | ||
@@ -812,14 +812,14 @@ static void sig_child_handler(int sig_no ATTRIBUTE_UNUSED) | |||
812 | } | 812 | } |
813 | } | 813 | } |
814 | 814 | ||
815 | static void sig_alarm_handler(int sig_no ATTRIBUTE_UNUSED) | 815 | static void sig_alarm_handler(int sig_no UNUSED_PARAM) |
816 | { | 816 | { |
817 | if (verbose) | 817 | if (verbose) |
818 | bb_error_msg(INFO"sig%s received", "alarm"); | 818 | bb_error_msg(INFO"sig%s received", "alarm"); |
819 | rotateasap = 1; | 819 | rotateasap = 1; |
820 | } | 820 | } |
821 | 821 | ||
822 | static void sig_hangup_handler(int sig_no ATTRIBUTE_UNUSED) | 822 | static void sig_hangup_handler(int sig_no UNUSED_PARAM) |
823 | { | 823 | { |
824 | if (verbose) | 824 | if (verbose) |
825 | bb_error_msg(INFO"sig%s received", "hangup"); | 825 | bb_error_msg(INFO"sig%s received", "hangup"); |
diff --git a/selinux/chcon.c b/selinux/chcon.c index 505ae4f32..80a030fde 100644 --- a/selinux/chcon.c +++ b/selinux/chcon.c | |||
@@ -30,9 +30,9 @@ static char *specified_context = NULL; | |||
30 | 30 | ||
31 | static int FAST_FUNC change_filedir_context( | 31 | static int FAST_FUNC change_filedir_context( |
32 | const char *fname, | 32 | const char *fname, |
33 | struct stat *stbuf ATTRIBUTE_UNUSED, | 33 | struct stat *stbuf UNUSED_PARAM, |
34 | void *userData ATTRIBUTE_UNUSED, | 34 | void *userData UNUSED_PARAM, |
35 | int depth ATTRIBUTE_UNUSED) | 35 | int depth UNUSED_PARAM) |
36 | { | 36 | { |
37 | context_t context = NULL; | 37 | context_t context = NULL; |
38 | security_context_t file_context = NULL; | 38 | security_context_t file_context = NULL; |
@@ -125,7 +125,7 @@ static const char chcon_longopts[] ALIGN1 = | |||
125 | #endif | 125 | #endif |
126 | 126 | ||
127 | int chcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 127 | int chcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
128 | int chcon_main(int argc ATTRIBUTE_UNUSED, char **argv) | 128 | int chcon_main(int argc UNUSED_PARAM, char **argv) |
129 | { | 129 | { |
130 | char *reference_file; | 130 | char *reference_file; |
131 | char *fname; | 131 | char *fname; |
diff --git a/selinux/getenforce.c b/selinux/getenforce.c index a39ce6d2b..21075cfd8 100644 --- a/selinux/getenforce.c +++ b/selinux/getenforce.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include "libbb.h" | 9 | #include "libbb.h" |
10 | 10 | ||
11 | int getenforce_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 11 | int getenforce_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
12 | int getenforce_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 12 | int getenforce_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
13 | { | 13 | { |
14 | int rc; | 14 | int rc; |
15 | 15 | ||
diff --git a/selinux/load_policy.c b/selinux/load_policy.c index c5b0e7a1b..b7a5c6eef 100644 --- a/selinux/load_policy.c +++ b/selinux/load_policy.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include "libbb.h" | 5 | #include "libbb.h" |
6 | 6 | ||
7 | int load_policy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 7 | int load_policy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
8 | int load_policy_main(int argc, char **argv ATTRIBUTE_UNUSED) | 8 | int load_policy_main(int argc, char **argv UNUSED_PARAM) |
9 | { | 9 | { |
10 | int rc; | 10 | int rc; |
11 | 11 | ||
diff --git a/selinux/matchpathcon.c b/selinux/matchpathcon.c index e0b374add..5cfd52aba 100644 --- a/selinux/matchpathcon.c +++ b/selinux/matchpathcon.c | |||
@@ -30,7 +30,7 @@ static int print_matchpathcon(char *path, int noprint) | |||
30 | #define OPT_VERIFY (1<<4) /* -V */ | 30 | #define OPT_VERIFY (1<<4) /* -V */ |
31 | 31 | ||
32 | int matchpathcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 32 | int matchpathcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
33 | int matchpathcon_main(int argc ATTRIBUTE_UNUSED, char **argv) | 33 | int matchpathcon_main(int argc UNUSED_PARAM, char **argv) |
34 | { | 34 | { |
35 | int error = 0; | 35 | int error = 0; |
36 | unsigned opts; | 36 | unsigned opts; |
diff --git a/selinux/runcon.c b/selinux/runcon.c index 0f573d1ec..a9471ef0c 100644 --- a/selinux/runcon.c +++ b/selinux/runcon.c | |||
@@ -88,7 +88,7 @@ static const char runcon_longopts[] ALIGN1 = | |||
88 | #define OPTS_CONTEXT_COMPONENT (OPTS_ROLE | OPTS_TYPE | OPTS_USER | OPTS_RANGE) | 88 | #define OPTS_CONTEXT_COMPONENT (OPTS_ROLE | OPTS_TYPE | OPTS_USER | OPTS_RANGE) |
89 | 89 | ||
90 | int runcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 90 | int runcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
91 | int runcon_main(int argc ATTRIBUTE_UNUSED, char **argv) | 91 | int runcon_main(int argc UNUSED_PARAM, char **argv) |
92 | { | 92 | { |
93 | char *role = NULL; | 93 | char *role = NULL; |
94 | char *range = NULL; | 94 | char *range = NULL; |
diff --git a/selinux/selinuxenabled.c b/selinux/selinuxenabled.c index c6e947ce5..ea233d891 100644 --- a/selinux/selinuxenabled.c +++ b/selinux/selinuxenabled.c | |||
@@ -8,7 +8,7 @@ | |||
8 | #include "libbb.h" | 8 | #include "libbb.h" |
9 | 9 | ||
10 | int selinuxenabled_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 10 | int selinuxenabled_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
11 | int selinuxenabled_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 11 | int selinuxenabled_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
12 | { | 12 | { |
13 | return !is_selinux_enabled(); | 13 | return !is_selinux_enabled(); |
14 | } | 14 | } |
diff --git a/selinux/sestatus.c b/selinux/sestatus.c index ec39afc21..3b027eeb2 100644 --- a/selinux/sestatus.c +++ b/selinux/sestatus.c | |||
@@ -159,7 +159,7 @@ static void display_verbose(void) | |||
159 | } | 159 | } |
160 | 160 | ||
161 | int sestatus_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 161 | int sestatus_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
162 | int sestatus_main(int argc ATTRIBUTE_UNUSED, char **argv) | 162 | int sestatus_main(int argc UNUSED_PARAM, char **argv) |
163 | { | 163 | { |
164 | unsigned opts; | 164 | unsigned opts; |
165 | const char *pol_path; | 165 | const char *pol_path; |
diff --git a/selinux/setfiles.c b/selinux/setfiles.c index 991c13cd7..d567f83aa 100644 --- a/selinux/setfiles.c +++ b/selinux/setfiles.c | |||
@@ -99,7 +99,7 @@ enum { | |||
99 | #define FLAG_R (option_mask32 & OPT_R) | 99 | #define FLAG_R (option_mask32 & OPT_R) |
100 | 100 | ||
101 | 101 | ||
102 | static void qprintf(const char *fmt ATTRIBUTE_UNUSED, ...) | 102 | static void qprintf(const char *fmt UNUSED_PARAM, ...) |
103 | { | 103 | { |
104 | /* quiet, do nothing */ | 104 | /* quiet, do nothing */ |
105 | } | 105 | } |
@@ -394,8 +394,8 @@ static int restore(const char *file) | |||
394 | static int FAST_FUNC apply_spec( | 394 | static int FAST_FUNC apply_spec( |
395 | const char *file, | 395 | const char *file, |
396 | struct stat *sb, | 396 | struct stat *sb, |
397 | void *userData ATTRIBUTE_UNUSED, | 397 | void *userData UNUSED_PARAM, |
398 | int depth ATTRIBUTE_UNUSED) | 398 | int depth UNUSED_PARAM) |
399 | { | 399 | { |
400 | if (!follow_mounts) { | 400 | if (!follow_mounts) { |
401 | /* setfiles does not process across different mount points */ | 401 | /* setfiles does not process across different mount points */ |
diff --git a/shell/ash.c b/shell/ash.c index 58bfc5278..77fe91a24 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -261,7 +261,7 @@ extern struct globals_misc *const ash_ptr_to_globals_misc; | |||
261 | * just do a longjmp to the exception handler. The type of exception is | 261 | * just do a longjmp to the exception handler. The type of exception is |
262 | * stored in the global variable "exception". | 262 | * stored in the global variable "exception". |
263 | */ | 263 | */ |
264 | static void raise_exception(int) ATTRIBUTE_NORETURN; | 264 | static void raise_exception(int) NORETURN; |
265 | static void | 265 | static void |
266 | raise_exception(int e) | 266 | raise_exception(int e) |
267 | { | 267 | { |
@@ -281,7 +281,7 @@ raise_exception(int e) | |||
281 | * are held using the INT_OFF macro. (The test for iflag is just | 281 | * are held using the INT_OFF macro. (The test for iflag is just |
282 | * defensive programming.) | 282 | * defensive programming.) |
283 | */ | 283 | */ |
284 | static void raise_interrupt(void) ATTRIBUTE_NORETURN; | 284 | static void raise_interrupt(void) NORETURN; |
285 | static void | 285 | static void |
286 | raise_interrupt(void) | 286 | raise_interrupt(void) |
287 | { | 287 | { |
@@ -1048,7 +1048,7 @@ ash_vmsg(const char *msg, va_list ap) | |||
1048 | * is not NULL then error prints an error message using printf style | 1048 | * is not NULL then error prints an error message using printf style |
1049 | * formatting. It then raises the error exception. | 1049 | * formatting. It then raises the error exception. |
1050 | */ | 1050 | */ |
1051 | static void ash_vmsg_and_raise(int, const char *, va_list) ATTRIBUTE_NORETURN; | 1051 | static void ash_vmsg_and_raise(int, const char *, va_list) NORETURN; |
1052 | static void | 1052 | static void |
1053 | ash_vmsg_and_raise(int cond, const char *msg, va_list ap) | 1053 | ash_vmsg_and_raise(int cond, const char *msg, va_list ap) |
1054 | { | 1054 | { |
@@ -1068,7 +1068,7 @@ ash_vmsg_and_raise(int cond, const char *msg, va_list ap) | |||
1068 | /* NOTREACHED */ | 1068 | /* NOTREACHED */ |
1069 | } | 1069 | } |
1070 | 1070 | ||
1071 | static void ash_msg_and_raise_error(const char *, ...) ATTRIBUTE_NORETURN; | 1071 | static void ash_msg_and_raise_error(const char *, ...) NORETURN; |
1072 | static void | 1072 | static void |
1073 | ash_msg_and_raise_error(const char *msg, ...) | 1073 | ash_msg_and_raise_error(const char *msg, ...) |
1074 | { | 1074 | { |
@@ -1080,7 +1080,7 @@ ash_msg_and_raise_error(const char *msg, ...) | |||
1080 | va_end(ap); | 1080 | va_end(ap); |
1081 | } | 1081 | } |
1082 | 1082 | ||
1083 | static void ash_msg_and_raise(int, const char *, ...) ATTRIBUTE_NORETURN; | 1083 | static void ash_msg_and_raise(int, const char *, ...) NORETURN; |
1084 | static void | 1084 | static void |
1085 | ash_msg_and_raise(int cond, const char *msg, ...) | 1085 | ash_msg_and_raise(int cond, const char *msg, ...) |
1086 | { | 1086 | { |
@@ -2462,7 +2462,7 @@ docd(const char *dest, int flags) | |||
2462 | } | 2462 | } |
2463 | 2463 | ||
2464 | static int | 2464 | static int |
2465 | cdcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 2465 | cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
2466 | { | 2466 | { |
2467 | const char *dest; | 2467 | const char *dest; |
2468 | const char *path; | 2468 | const char *path; |
@@ -2526,7 +2526,7 @@ cdcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | |||
2526 | } | 2526 | } |
2527 | 2527 | ||
2528 | static int | 2528 | static int |
2529 | pwdcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 2529 | pwdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
2530 | { | 2530 | { |
2531 | int flags; | 2531 | int flags; |
2532 | const char *dir = curdir; | 2532 | const char *dir = curdir; |
@@ -3128,7 +3128,7 @@ printalias(const struct alias *ap) | |||
3128 | * TODO - sort output | 3128 | * TODO - sort output |
3129 | */ | 3129 | */ |
3130 | static int | 3130 | static int |
3131 | aliascmd(int argc ATTRIBUTE_UNUSED, char **argv) | 3131 | aliascmd(int argc UNUSED_PARAM, char **argv) |
3132 | { | 3132 | { |
3133 | char *n, *v; | 3133 | char *n, *v; |
3134 | int ret = 0; | 3134 | int ret = 0; |
@@ -3163,7 +3163,7 @@ aliascmd(int argc ATTRIBUTE_UNUSED, char **argv) | |||
3163 | } | 3163 | } |
3164 | 3164 | ||
3165 | static int | 3165 | static int |
3166 | unaliascmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 3166 | unaliascmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
3167 | { | 3167 | { |
3168 | int i; | 3168 | int i; |
3169 | 3169 | ||
@@ -3670,7 +3670,7 @@ restartjob(struct job *jp, int mode) | |||
3670 | } | 3670 | } |
3671 | 3671 | ||
3672 | static int | 3672 | static int |
3673 | fg_bgcmd(int argc ATTRIBUTE_UNUSED, char **argv) | 3673 | fg_bgcmd(int argc UNUSED_PARAM, char **argv) |
3674 | { | 3674 | { |
3675 | struct job *jp; | 3675 | struct job *jp; |
3676 | FILE *out; | 3676 | FILE *out; |
@@ -3957,7 +3957,7 @@ showjobs(FILE *out, int mode) | |||
3957 | } | 3957 | } |
3958 | 3958 | ||
3959 | static int | 3959 | static int |
3960 | jobscmd(int argc ATTRIBUTE_UNUSED, char **argv) | 3960 | jobscmd(int argc UNUSED_PARAM, char **argv) |
3961 | { | 3961 | { |
3962 | int mode, m; | 3962 | int mode, m; |
3963 | 3963 | ||
@@ -4010,7 +4010,7 @@ getstatus(struct job *job) | |||
4010 | } | 4010 | } |
4011 | 4011 | ||
4012 | static int | 4012 | static int |
4013 | waitcmd(int argc ATTRIBUTE_UNUSED, char **argv) | 4013 | waitcmd(int argc UNUSED_PARAM, char **argv) |
4014 | { | 4014 | { |
4015 | struct job *job; | 4015 | struct job *job; |
4016 | int retval; | 4016 | int retval; |
@@ -5681,7 +5681,7 @@ argstr(char *p, int flag, struct strlist *var_str_list) | |||
5681 | } | 5681 | } |
5682 | 5682 | ||
5683 | static char * | 5683 | static char * |
5684 | scanleft(char *startp, char *rmesc, char *rmescend ATTRIBUTE_UNUSED, char *str, int quotes, | 5684 | scanleft(char *startp, char *rmesc, char *rmescend UNUSED_PARAM, char *str, int quotes, |
5685 | int zero) | 5685 | int zero) |
5686 | { | 5686 | { |
5687 | // This commented out code was added by James Simmons <jsimmons@infradead.org> | 5687 | // This commented out code was added by James Simmons <jsimmons@infradead.org> |
@@ -5785,7 +5785,7 @@ scanright(char *startp, char *rmesc, char *rmescend, char *str, int quotes, | |||
5785 | return 0; | 5785 | return 0; |
5786 | } | 5786 | } |
5787 | 5787 | ||
5788 | static void varunset(const char *, const char *, const char *, int) ATTRIBUTE_NORETURN; | 5788 | static void varunset(const char *, const char *, const char *, int) NORETURN; |
5789 | static void | 5789 | static void |
5790 | varunset(const char *end, const char *var, const char *umsg, int varflags) | 5790 | varunset(const char *end, const char *var, const char *umsg, int varflags) |
5791 | { | 5791 | { |
@@ -6906,7 +6906,7 @@ tryexec(USE_FEATURE_SH_STANDALONE(int applet_no,) char *cmd, char **argv, char * | |||
6906 | * Exec a program. Never returns. If you change this routine, you may | 6906 | * Exec a program. Never returns. If you change this routine, you may |
6907 | * have to change the find_command routine as well. | 6907 | * have to change the find_command routine as well. |
6908 | */ | 6908 | */ |
6909 | static void shellexec(char **, const char *, int) ATTRIBUTE_NORETURN; | 6909 | static void shellexec(char **, const char *, int) NORETURN; |
6910 | static void | 6910 | static void |
6911 | shellexec(char **argv, const char *path, int idx) | 6911 | shellexec(char **argv, const char *path, int idx) |
6912 | { | 6912 | { |
@@ -7083,7 +7083,7 @@ addcmdentry(char *name, struct cmdentry *entry) | |||
7083 | } | 7083 | } |
7084 | 7084 | ||
7085 | static int | 7085 | static int |
7086 | hashcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 7086 | hashcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
7087 | { | 7087 | { |
7088 | struct tblentry **pp; | 7088 | struct tblentry **pp; |
7089 | struct tblentry *cmdp; | 7089 | struct tblentry *cmdp; |
@@ -7385,7 +7385,7 @@ describe_command(char *command, int describe_command_verbose) | |||
7385 | } | 7385 | } |
7386 | 7386 | ||
7387 | static int | 7387 | static int |
7388 | typecmd(int argc ATTRIBUTE_UNUSED, char **argv) | 7388 | typecmd(int argc UNUSED_PARAM, char **argv) |
7389 | { | 7389 | { |
7390 | int i = 1; | 7390 | int i = 1; |
7391 | int err = 0; | 7391 | int err = 0; |
@@ -7404,7 +7404,7 @@ typecmd(int argc ATTRIBUTE_UNUSED, char **argv) | |||
7404 | 7404 | ||
7405 | #if ENABLE_ASH_CMDCMD | 7405 | #if ENABLE_ASH_CMDCMD |
7406 | static int | 7406 | static int |
7407 | commandcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 7407 | commandcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
7408 | { | 7408 | { |
7409 | int c; | 7409 | int c; |
7410 | enum { | 7410 | enum { |
@@ -8341,7 +8341,7 @@ mklocal(char *name) | |||
8341 | * The "local" command. | 8341 | * The "local" command. |
8342 | */ | 8342 | */ |
8343 | static int | 8343 | static int |
8344 | localcmd(int argc ATTRIBUTE_UNUSED, char **argv) | 8344 | localcmd(int argc UNUSED_PARAM, char **argv) |
8345 | { | 8345 | { |
8346 | char *name; | 8346 | char *name; |
8347 | 8347 | ||
@@ -8353,19 +8353,19 @@ localcmd(int argc ATTRIBUTE_UNUSED, char **argv) | |||
8353 | } | 8353 | } |
8354 | 8354 | ||
8355 | static int | 8355 | static int |
8356 | falsecmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 8356 | falsecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
8357 | { | 8357 | { |
8358 | return 1; | 8358 | return 1; |
8359 | } | 8359 | } |
8360 | 8360 | ||
8361 | static int | 8361 | static int |
8362 | truecmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 8362 | truecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
8363 | { | 8363 | { |
8364 | return 0; | 8364 | return 0; |
8365 | } | 8365 | } |
8366 | 8366 | ||
8367 | static int | 8367 | static int |
8368 | execcmd(int argc ATTRIBUTE_UNUSED, char **argv) | 8368 | execcmd(int argc UNUSED_PARAM, char **argv) |
8369 | { | 8369 | { |
8370 | if (argv[1]) { | 8370 | if (argv[1]) { |
8371 | iflag = 0; /* exit on error */ | 8371 | iflag = 0; /* exit on error */ |
@@ -8380,7 +8380,7 @@ execcmd(int argc ATTRIBUTE_UNUSED, char **argv) | |||
8380 | * The return command. | 8380 | * The return command. |
8381 | */ | 8381 | */ |
8382 | static int | 8382 | static int |
8383 | returncmd(int argc ATTRIBUTE_UNUSED, char **argv) | 8383 | returncmd(int argc UNUSED_PARAM, char **argv) |
8384 | { | 8384 | { |
8385 | /* | 8385 | /* |
8386 | * If called outside a function, do what ksh does; | 8386 | * If called outside a function, do what ksh does; |
@@ -8561,7 +8561,7 @@ isassignment(const char *p) | |||
8561 | return *q == '='; | 8561 | return *q == '='; |
8562 | } | 8562 | } |
8563 | static int | 8563 | static int |
8564 | bltincmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 8564 | bltincmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
8565 | { | 8565 | { |
8566 | /* Preserve exitstatus of a previous possible redirection | 8566 | /* Preserve exitstatus of a previous possible redirection |
8567 | * as POSIX mandates */ | 8567 | * as POSIX mandates */ |
@@ -8874,7 +8874,7 @@ prehash(union node *n) | |||
8874 | * in the standard shell so we don't make it one here. | 8874 | * in the standard shell so we don't make it one here. |
8875 | */ | 8875 | */ |
8876 | static int | 8876 | static int |
8877 | breakcmd(int argc ATTRIBUTE_UNUSED, char **argv) | 8877 | breakcmd(int argc UNUSED_PARAM, char **argv) |
8878 | { | 8878 | { |
8879 | int n = argv[1] ? number(argv[1]) : 1; | 8879 | int n = argv[1] ? number(argv[1]) : 1; |
8880 | 8880 | ||
@@ -9377,7 +9377,7 @@ chkmail(void) | |||
9377 | } | 9377 | } |
9378 | 9378 | ||
9379 | static void | 9379 | static void |
9380 | changemail(const char *val ATTRIBUTE_UNUSED) | 9380 | changemail(const char *val UNUSED_PARAM) |
9381 | { | 9381 | { |
9382 | mail_var_path_changed = 1; | 9382 | mail_var_path_changed = 1; |
9383 | } | 9383 | } |
@@ -9533,7 +9533,7 @@ options(int cmdline) | |||
9533 | * The shift builtin command. | 9533 | * The shift builtin command. |
9534 | */ | 9534 | */ |
9535 | static int | 9535 | static int |
9536 | shiftcmd(int argc ATTRIBUTE_UNUSED, char **argv) | 9536 | shiftcmd(int argc UNUSED_PARAM, char **argv) |
9537 | { | 9537 | { |
9538 | int n; | 9538 | int n; |
9539 | char **ap1, **ap2; | 9539 | char **ap1, **ap2; |
@@ -9595,7 +9595,7 @@ showvars(const char *sep_prefix, int on, int off) | |||
9595 | * The set command builtin. | 9595 | * The set command builtin. |
9596 | */ | 9596 | */ |
9597 | static int | 9597 | static int |
9598 | setcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 9598 | setcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
9599 | { | 9599 | { |
9600 | int retval; | 9600 | int retval; |
9601 | 9601 | ||
@@ -9797,7 +9797,7 @@ static struct heredoc *heredoc; | |||
9797 | */ | 9797 | */ |
9798 | #define NEOF ((union node *)&tokpushback) | 9798 | #define NEOF ((union node *)&tokpushback) |
9799 | 9799 | ||
9800 | static void raise_error_syntax(const char *) ATTRIBUTE_NORETURN; | 9800 | static void raise_error_syntax(const char *) NORETURN; |
9801 | static void | 9801 | static void |
9802 | raise_error_syntax(const char *msg) | 9802 | raise_error_syntax(const char *msg) |
9803 | { | 9803 | { |
@@ -9810,7 +9810,7 @@ raise_error_syntax(const char *msg) | |||
9810 | * is the token that is expected, or -1 if more than one type of token can | 9810 | * is the token that is expected, or -1 if more than one type of token can |
9811 | * occur at this point. | 9811 | * occur at this point. |
9812 | */ | 9812 | */ |
9813 | static void raise_error_unexpected_syntax(int) ATTRIBUTE_NORETURN; | 9813 | static void raise_error_unexpected_syntax(int) NORETURN; |
9814 | static void | 9814 | static void |
9815 | raise_error_unexpected_syntax(int token) | 9815 | raise_error_unexpected_syntax(int token) |
9816 | { | 9816 | { |
@@ -11414,7 +11414,7 @@ evalstring(char *s, int mask) | |||
11414 | * The eval command. | 11414 | * The eval command. |
11415 | */ | 11415 | */ |
11416 | static int | 11416 | static int |
11417 | evalcmd(int argc ATTRIBUTE_UNUSED, char **argv) | 11417 | evalcmd(int argc UNUSED_PARAM, char **argv) |
11418 | { | 11418 | { |
11419 | char *p; | 11419 | char *p; |
11420 | char *concat; | 11420 | char *concat; |
@@ -11563,7 +11563,7 @@ dotcmd(int argc, char **argv) | |||
11563 | } | 11563 | } |
11564 | 11564 | ||
11565 | static int | 11565 | static int |
11566 | exitcmd(int argc ATTRIBUTE_UNUSED, char **argv) | 11566 | exitcmd(int argc UNUSED_PARAM, char **argv) |
11567 | { | 11567 | { |
11568 | if (stoppedjobs()) | 11568 | if (stoppedjobs()) |
11569 | return 0; | 11569 | return 0; |
@@ -11787,7 +11787,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path) | |||
11787 | * The trap builtin. | 11787 | * The trap builtin. |
11788 | */ | 11788 | */ |
11789 | static int | 11789 | static int |
11790 | trapcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 11790 | trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
11791 | { | 11791 | { |
11792 | char *action; | 11792 | char *action; |
11793 | char **ap; | 11793 | char **ap; |
@@ -11840,7 +11840,7 @@ trapcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | |||
11840 | * Lists available builtins | 11840 | * Lists available builtins |
11841 | */ | 11841 | */ |
11842 | static int | 11842 | static int |
11843 | helpcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 11843 | helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
11844 | { | 11844 | { |
11845 | unsigned col; | 11845 | unsigned col; |
11846 | unsigned i; | 11846 | unsigned i; |
@@ -11876,7 +11876,7 @@ helpcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | |||
11876 | * The export and readonly commands. | 11876 | * The export and readonly commands. |
11877 | */ | 11877 | */ |
11878 | static int | 11878 | static int |
11879 | exportcmd(int argc ATTRIBUTE_UNUSED, char **argv) | 11879 | exportcmd(int argc UNUSED_PARAM, char **argv) |
11880 | { | 11880 | { |
11881 | struct var *vp; | 11881 | struct var *vp; |
11882 | char *name; | 11882 | char *name; |
@@ -11927,7 +11927,7 @@ unsetfunc(const char *name) | |||
11927 | * with the same name. | 11927 | * with the same name. |
11928 | */ | 11928 | */ |
11929 | static int | 11929 | static int |
11930 | unsetcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 11930 | unsetcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
11931 | { | 11931 | { |
11932 | char **ap; | 11932 | char **ap; |
11933 | int i; | 11933 | int i; |
@@ -11965,7 +11965,7 @@ static const unsigned char timescmd_str[] ALIGN1 = { | |||
11965 | }; | 11965 | }; |
11966 | 11966 | ||
11967 | static int | 11967 | static int |
11968 | timescmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 11968 | timescmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
11969 | { | 11969 | { |
11970 | long clk_tck, s, t; | 11970 | long clk_tck, s, t; |
11971 | const unsigned char *p; | 11971 | const unsigned char *p; |
@@ -12017,7 +12017,7 @@ dash_arith(const char *s) | |||
12017 | * Copyright (C) 2003 Vladimir Oleynik <dzo@simtreas.ru> | 12017 | * Copyright (C) 2003 Vladimir Oleynik <dzo@simtreas.ru> |
12018 | */ | 12018 | */ |
12019 | static int | 12019 | static int |
12020 | letcmd(int argc ATTRIBUTE_UNUSED, char **argv) | 12020 | letcmd(int argc UNUSED_PARAM, char **argv) |
12021 | { | 12021 | { |
12022 | arith_t i; | 12022 | arith_t i; |
12023 | 12023 | ||
@@ -12059,7 +12059,7 @@ typedef enum __rlimit_resource rlim_t; | |||
12059 | * -e Use line editing (tty only) | 12059 | * -e Use line editing (tty only) |
12060 | */ | 12060 | */ |
12061 | static int | 12061 | static int |
12062 | readcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 12062 | readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
12063 | { | 12063 | { |
12064 | static const char *const arg_REPLY[] = { "REPLY", NULL }; | 12064 | static const char *const arg_REPLY[] = { "REPLY", NULL }; |
12065 | 12065 | ||
@@ -12256,7 +12256,7 @@ readcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | |||
12256 | } | 12256 | } |
12257 | 12257 | ||
12258 | static int | 12258 | static int |
12259 | umaskcmd(int argc ATTRIBUTE_UNUSED, char **argv) | 12259 | umaskcmd(int argc UNUSED_PARAM, char **argv) |
12260 | { | 12260 | { |
12261 | static const char permuser[3] ALIGN1 = "ugo"; | 12261 | static const char permuser[3] ALIGN1 = "ugo"; |
12262 | static const char permmode[3] ALIGN1 = "rwx"; | 12262 | static const char permmode[3] ALIGN1 = "rwx"; |
@@ -12431,7 +12431,7 @@ printlim(enum limtype how, const struct rlimit *limit, | |||
12431 | } | 12431 | } |
12432 | 12432 | ||
12433 | static int | 12433 | static int |
12434 | ulimitcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 12434 | ulimitcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
12435 | { | 12435 | { |
12436 | int c; | 12436 | int c; |
12437 | rlim_t val = 0; | 12437 | rlim_t val = 0; |
@@ -13194,7 +13194,7 @@ arith(const char *expr, int *perrcode) | |||
13194 | /* | 13194 | /* |
13195 | * Called to exit the shell. | 13195 | * Called to exit the shell. |
13196 | */ | 13196 | */ |
13197 | static void exitshell(void) ATTRIBUTE_NORETURN; | 13197 | static void exitshell(void) NORETURN; |
13198 | static void | 13198 | static void |
13199 | exitshell(void) | 13199 | exitshell(void) |
13200 | { | 13200 | { |
@@ -13373,7 +13373,7 @@ extern int etext(); | |||
13373 | * is used to figure out how far we had gotten. | 13373 | * is used to figure out how far we had gotten. |
13374 | */ | 13374 | */ |
13375 | int ash_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 13375 | int ash_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
13376 | int ash_main(int argc ATTRIBUTE_UNUSED, char **argv) | 13376 | int ash_main(int argc UNUSED_PARAM, char **argv) |
13377 | { | 13377 | { |
13378 | char *shinit; | 13378 | char *shinit; |
13379 | volatile int state; | 13379 | volatile int state; |
diff --git a/shell/cttyhack.c b/shell/cttyhack.c index bbe514933..0aa4b8a2c 100644 --- a/shell/cttyhack.c +++ b/shell/cttyhack.c | |||
@@ -38,7 +38,7 @@ struct serial_struct { | |||
38 | }; | 38 | }; |
39 | 39 | ||
40 | int cttyhack_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 40 | int cttyhack_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
41 | int cttyhack_main(int argc ATTRIBUTE_UNUSED, char **argv) | 41 | int cttyhack_main(int argc UNUSED_PARAM, char **argv) |
42 | { | 42 | { |
43 | int fd; | 43 | int fd; |
44 | char console[sizeof(int)*3 + 16]; | 44 | char console[sizeof(int)*3 + 16]; |
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 |
541 | static void pseudo_exec_argv(char **ptrs2free, char **argv) ATTRIBUTE_NORETURN; | 541 | static void pseudo_exec_argv(char **ptrs2free, char **argv) NORETURN; |
542 | static void pseudo_exec(char **ptrs2free, struct child_prog *child) ATTRIBUTE_NORETURN; | 542 | static void pseudo_exec(char **ptrs2free, struct child_prog *child) NORETURN; |
543 | static int run_pipe(struct pipe *pi); | 543 | static int run_pipe(struct pipe *pi); |
544 | /* data structure manipulation: */ | 544 | /* data structure manipulation: */ |
545 | static int setup_redirect(struct p_context *ctx, int fd, redir_type style, struct in_str *input); | 545 | static 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 | ||
808 | static void handler_ctrl_c(int sig ATTRIBUTE_UNUSED) | 808 | static 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 | ||
815 | static void handler_ctrl_z(int sig ATTRIBUTE_UNUSED) | 815 | static 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. */ |
852 | static void sigexit(int sig) ATTRIBUTE_NORETURN; | 852 | static void sigexit(int sig) NORETURN; |
853 | static void sigexit(int sig) | 853 | static 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. */ |
869 | static void hush_exit(int exitcode) ATTRIBUTE_NORETURN; | 869 | static void hush_exit(int exitcode) NORETURN; |
870 | static void hush_exit(int exitcode) | 870 | static 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 | */ |
4007 | static int builtin_true(char **argv ATTRIBUTE_UNUSED) | 4007 | static 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 |
4191 | static int builtin_help(char **argv ATTRIBUTE_UNUSED) | 4191 | static 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 |
4206 | static int builtin_jobs(char **argv ATTRIBUTE_UNUSED) | 4206 | static 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 | ||
4223 | static int builtin_pwd(char **argv ATTRIBUTE_UNUSED) | 4223 | static 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; |
diff --git a/shell/lash_unused.c b/shell/lash_unused.c index 59199ded4..708408954 100644 --- a/shell/lash_unused.c +++ b/shell/lash_unused.c | |||
@@ -119,7 +119,7 @@ static void remove_job(struct jobset *j_list, struct job *job); | |||
119 | static int get_command_bufsiz(FILE *source, char *command); | 119 | static int get_command_bufsiz(FILE *source, char *command); |
120 | static int parse_command(char **command_ptr, struct job *job, int *inbg); | 120 | static int parse_command(char **command_ptr, struct job *job, int *inbg); |
121 | static int run_command(struct job *newjob, int inbg, int outpipe[2]); | 121 | static int run_command(struct job *newjob, int inbg, int outpipe[2]); |
122 | static int pseudo_exec(struct child_prog *cmd) ATTRIBUTE_NORETURN; | 122 | static int pseudo_exec(struct child_prog *cmd) NORETURN; |
123 | static int busy_loop(FILE *input); | 123 | static int busy_loop(FILE *input); |
124 | 124 | ||
125 | 125 | ||
@@ -177,7 +177,7 @@ static inline void debug_printf(const char *format, ...) | |||
177 | va_end(args); | 177 | va_end(args); |
178 | } | 178 | } |
179 | #else | 179 | #else |
180 | static inline void debug_printf(const char ATTRIBUTE_UNUSED *format, ...) { } | 180 | static inline void debug_printf(const char UNUSED_PARAM *format, ...) { } |
181 | #endif | 181 | #endif |
182 | 182 | ||
183 | /* | 183 | /* |
@@ -308,7 +308,7 @@ static int builtin_fg_bg(struct child_prog *child) | |||
308 | } | 308 | } |
309 | 309 | ||
310 | /* built-in 'help' handler */ | 310 | /* built-in 'help' handler */ |
311 | static int builtin_help(struct child_prog ATTRIBUTE_UNUSED *dummy) | 311 | static int builtin_help(struct child_prog UNUSED_PARAM *dummy) |
312 | { | 312 | { |
313 | const struct built_in_command *x; | 313 | const struct built_in_command *x; |
314 | 314 | ||
@@ -342,7 +342,7 @@ static int builtin_jobs(struct child_prog *child) | |||
342 | 342 | ||
343 | 343 | ||
344 | /* built-in 'pwd' handler */ | 344 | /* built-in 'pwd' handler */ |
345 | static int builtin_pwd(struct child_prog ATTRIBUTE_UNUSED *dummy) | 345 | static int builtin_pwd(struct child_prog UNUSED_PARAM *dummy) |
346 | { | 346 | { |
347 | update_cwd(); | 347 | update_cwd(); |
348 | puts(cwd); | 348 | puts(cwd); |
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); |
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index e719001cf..c4bbf1558 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c | |||
@@ -39,7 +39,7 @@ enum { | |||
39 | }; | 39 | }; |
40 | 40 | ||
41 | int klogd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 41 | int klogd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
42 | int klogd_main(int argc ATTRIBUTE_UNUSED, char **argv) | 42 | int klogd_main(int argc UNUSED_PARAM, char **argv) |
43 | { | 43 | { |
44 | int i = 0; | 44 | int i = 0; |
45 | char *start; | 45 | char *start; |
diff --git a/sysklogd/logread.c b/sysklogd/logread.c index 1753ce324..603a3776c 100644 --- a/sysklogd/logread.c +++ b/sysklogd/logread.c | |||
@@ -43,7 +43,7 @@ struct globals { | |||
43 | memcpy(SMrup, init_sem, sizeof(init_sem)); \ | 43 | memcpy(SMrup, init_sem, sizeof(init_sem)); \ |
44 | } while (0) | 44 | } while (0) |
45 | 45 | ||
46 | static void error_exit(const char *str) ATTRIBUTE_NORETURN; | 46 | static void error_exit(const char *str) NORETURN; |
47 | static void error_exit(const char *str) | 47 | static void error_exit(const char *str) |
48 | { | 48 | { |
49 | //release all acquired resources | 49 | //release all acquired resources |
@@ -60,7 +60,7 @@ static void sem_up(int semid) | |||
60 | error_exit("semop[SMrup]"); | 60 | error_exit("semop[SMrup]"); |
61 | } | 61 | } |
62 | 62 | ||
63 | static void interrupted(int sig ATTRIBUTE_UNUSED) | 63 | static void interrupted(int sig UNUSED_PARAM) |
64 | { | 64 | { |
65 | signal(SIGINT, SIG_IGN); | 65 | signal(SIGINT, SIG_IGN); |
66 | shmdt(shbuf); | 66 | shmdt(shbuf); |
@@ -68,7 +68,7 @@ static void interrupted(int sig ATTRIBUTE_UNUSED) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | int logread_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 70 | int logread_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
71 | int logread_main(int argc ATTRIBUTE_UNUSED, char **argv) | 71 | int logread_main(int argc UNUSED_PARAM, char **argv) |
72 | { | 72 | { |
73 | unsigned cur; | 73 | unsigned cur; |
74 | int log_semid; /* ipc semaphore id */ | 74 | int log_semid; /* ipc semaphore id */ |
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index b9af9c55f..4c9efd8ba 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -541,7 +541,7 @@ static int try_to_resolve_remote(void) | |||
541 | } | 541 | } |
542 | #endif | 542 | #endif |
543 | 543 | ||
544 | static void do_syslogd(void) ATTRIBUTE_NORETURN; | 544 | static void do_syslogd(void) NORETURN; |
545 | static void do_syslogd(void) | 545 | static void do_syslogd(void) |
546 | { | 546 | { |
547 | int sock_fd; | 547 | int sock_fd; |
@@ -638,7 +638,7 @@ static void do_syslogd(void) | |||
638 | } | 638 | } |
639 | 639 | ||
640 | int syslogd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 640 | int syslogd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
641 | int syslogd_main(int argc ATTRIBUTE_UNUSED, char **argv) | 641 | int syslogd_main(int argc UNUSED_PARAM, char **argv) |
642 | { | 642 | { |
643 | char OPTION_DECL; | 643 | char OPTION_DECL; |
644 | 644 | ||
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index 73b2595f1..840358c85 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "libbb.h" | 13 | #include "libbb.h" |
14 | 14 | ||
15 | int dmesg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 15 | int dmesg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
16 | int dmesg_main(int argc ATTRIBUTE_UNUSED, char **argv) | 16 | int dmesg_main(int argc UNUSED_PARAM, char **argv) |
17 | { | 17 | { |
18 | int len; | 18 | int len; |
19 | char *buf; | 19 | char *buf; |
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c index eac7b15e9..094d620ee 100644 --- a/util-linux/fdformat.c +++ b/util-linux/fdformat.c | |||
@@ -41,7 +41,7 @@ struct format_descr { | |||
41 | #define FD_FILL_BYTE 0xF6 /* format fill byte. */ | 41 | #define FD_FILL_BYTE 0xF6 /* format fill byte. */ |
42 | 42 | ||
43 | int fdformat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 43 | int fdformat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
44 | int fdformat_main(int argc ATTRIBUTE_UNUSED, char **argv) | 44 | int fdformat_main(int argc UNUSED_PARAM, char **argv) |
45 | { | 45 | { |
46 | int fd, n, cyl, read_bytes, verify; | 46 | int fd, n, cyl, read_bytes, verify; |
47 | unsigned char *data; | 47 | unsigned char *data; |
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index a1d31501b..b44a2b425 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c | |||
@@ -81,12 +81,12 @@ struct partition { | |||
81 | unsigned char end_cyl; /* end cylinder */ | 81 | unsigned char end_cyl; /* end cylinder */ |
82 | unsigned char start4[4]; /* starting sector counting from 0 */ | 82 | unsigned char start4[4]; /* starting sector counting from 0 */ |
83 | unsigned char size4[4]; /* nr of sectors in partition */ | 83 | unsigned char size4[4]; /* nr of sectors in partition */ |
84 | } ATTRIBUTE_PACKED; | 84 | } PACKED; |
85 | 85 | ||
86 | static const char unable_to_open[] ALIGN1 = "cannot open %s"; | 86 | static const char unable_to_open[] ALIGN1 = "cannot open %s"; |
87 | static const char unable_to_read[] ALIGN1 = "cannot read from %s"; | 87 | static const char unable_to_read[] ALIGN1 = "cannot read from %s"; |
88 | static const char unable_to_seek[] ALIGN1 = "cannot seek on %s"; | 88 | static const char unable_to_seek[] ALIGN1 = "cannot seek on %s"; |
89 | static void fdisk_fatal(const char *why) ATTRIBUTE_NORETURN; | 89 | static void fdisk_fatal(const char *why) NORETURN; |
90 | 90 | ||
91 | enum label_type { | 91 | enum label_type { |
92 | LABEL_DOS, LABEL_SUN, LABEL_SGI, LABEL_AIX, LABEL_OSF | 92 | LABEL_DOS, LABEL_SUN, LABEL_SGI, LABEL_AIX, LABEL_OSF |
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index cd17afafe..b0d5c6a3f 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c | |||
@@ -289,7 +289,7 @@ static void recursive_check(unsigned ino); | |||
289 | static void recursive_check2(unsigned ino); | 289 | static void recursive_check2(unsigned ino); |
290 | #endif | 290 | #endif |
291 | 291 | ||
292 | static void die(const char *str) ATTRIBUTE_NORETURN; | 292 | static void die(const char *str) NORETURN; |
293 | static void die(const char *str) | 293 | static void die(const char *str) |
294 | { | 294 | { |
295 | if (termios_set) | 295 | if (termios_set) |
@@ -1204,7 +1204,7 @@ void check2(void); | |||
1204 | #endif | 1204 | #endif |
1205 | 1205 | ||
1206 | int fsck_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 1206 | int fsck_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
1207 | int fsck_minix_main(int argc ATTRIBUTE_UNUSED, char **argv) | 1207 | int fsck_minix_main(int argc UNUSED_PARAM, char **argv) |
1208 | { | 1208 | { |
1209 | struct termios tmp; | 1209 | struct termios tmp; |
1210 | int retcode = 0; | 1210 | int retcode = 0; |
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index a03d61bbf..3d28364e9 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c | |||
@@ -90,7 +90,7 @@ static void from_sys_clock(int utc) | |||
90 | #define HWCLOCK_OPT_RTCFILE 0x20 | 90 | #define HWCLOCK_OPT_RTCFILE 0x20 |
91 | 91 | ||
92 | int hwclock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 92 | int hwclock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
93 | int hwclock_main(int argc ATTRIBUTE_UNUSED, char **argv) | 93 | int hwclock_main(int argc UNUSED_PARAM, char **argv) |
94 | { | 94 | { |
95 | unsigned opt; | 95 | unsigned opt; |
96 | int utc; | 96 | int utc; |
diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c index 111defa1e..920125708 100644 --- a/util-linux/ipcs.c +++ b/util-linux/ipcs.c | |||
@@ -559,7 +559,7 @@ static void print_sem(int semid) | |||
559 | } | 559 | } |
560 | 560 | ||
561 | int ipcs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 561 | int ipcs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
562 | int ipcs_main(int argc ATTRIBUTE_UNUSED, char **argv) | 562 | int ipcs_main(int argc UNUSED_PARAM, char **argv) |
563 | { | 563 | { |
564 | int id = 0; | 564 | int id = 0; |
565 | unsigned flags = 0; | 565 | unsigned flags = 0; |
diff --git a/util-linux/mdev.c b/util-linux/mdev.c index bacccc02f..c7109373d 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c | |||
@@ -300,9 +300,9 @@ static void make_device(char *path, int delete) | |||
300 | 300 | ||
301 | /* File callback for /sys/ traversal */ | 301 | /* File callback for /sys/ traversal */ |
302 | static int FAST_FUNC fileAction(const char *fileName, | 302 | static int FAST_FUNC fileAction(const char *fileName, |
303 | struct stat *statbuf ATTRIBUTE_UNUSED, | 303 | struct stat *statbuf UNUSED_PARAM, |
304 | void *userData, | 304 | void *userData, |
305 | int depth ATTRIBUTE_UNUSED) | 305 | int depth UNUSED_PARAM) |
306 | { | 306 | { |
307 | size_t len = strlen(fileName) - 4; /* can't underflow */ | 307 | size_t len = strlen(fileName) - 4; /* can't underflow */ |
308 | char *scratch = userData; | 308 | char *scratch = userData; |
@@ -319,9 +319,9 @@ static int FAST_FUNC fileAction(const char *fileName, | |||
319 | } | 319 | } |
320 | 320 | ||
321 | /* Directory callback for /sys/ traversal */ | 321 | /* Directory callback for /sys/ traversal */ |
322 | static int FAST_FUNC dirAction(const char *fileName ATTRIBUTE_UNUSED, | 322 | static int FAST_FUNC dirAction(const char *fileName UNUSED_PARAM, |
323 | struct stat *statbuf ATTRIBUTE_UNUSED, | 323 | struct stat *statbuf UNUSED_PARAM, |
324 | void *userData ATTRIBUTE_UNUSED, | 324 | void *userData UNUSED_PARAM, |
325 | int depth) | 325 | int depth) |
326 | { | 326 | { |
327 | return (depth >= MAX_SYSFS_DEPTH ? SKIP : TRUE); | 327 | return (depth >= MAX_SYSFS_DEPTH ? SKIP : TRUE); |
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index 1e00a085c..ceeb72a2b 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c | |||
@@ -495,7 +495,7 @@ static size_t do_check(char *buffer, size_t try, unsigned current_block) | |||
495 | return try; | 495 | return try; |
496 | } | 496 | } |
497 | 497 | ||
498 | static void alarm_intr(int alnum ATTRIBUTE_UNUSED) | 498 | static void alarm_intr(int alnum UNUSED_PARAM) |
499 | { | 499 | { |
500 | if (G.currently_testing >= SB_ZONES) | 500 | if (G.currently_testing >= SB_ZONES) |
501 | return; | 501 | return; |
@@ -621,7 +621,7 @@ static void setup_tables(void) | |||
621 | } | 621 | } |
622 | 622 | ||
623 | int mkfs_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 623 | int mkfs_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
624 | int mkfs_minix_main(int argc ATTRIBUTE_UNUSED, char **argv) | 624 | int mkfs_minix_main(int argc UNUSED_PARAM, char **argv) |
625 | { | 625 | { |
626 | struct mntent *mp; | 626 | struct mntent *mp; |
627 | unsigned opt; | 627 | unsigned opt; |
diff --git a/util-linux/more.c b/util-linux/more.c index 2577a67ac..93954660e 100644 --- a/util-linux/more.c +++ b/util-linux/more.c | |||
@@ -36,7 +36,7 @@ struct globals { | |||
36 | #define setTermSettings(fd, argp) tcsetattr(fd, TCSANOW, argp) | 36 | #define setTermSettings(fd, argp) tcsetattr(fd, TCSANOW, argp) |
37 | #define getTermSettings(fd, argp) tcgetattr(fd, argp) | 37 | #define getTermSettings(fd, argp) tcgetattr(fd, argp) |
38 | 38 | ||
39 | static void gotsig(int sig ATTRIBUTE_UNUSED) | 39 | static void gotsig(int sig UNUSED_PARAM) |
40 | { | 40 | { |
41 | bb_putchar('\n'); | 41 | bb_putchar('\n'); |
42 | setTermSettings(cin_fileno, &initial_settings); | 42 | setTermSettings(cin_fileno, &initial_settings); |
@@ -51,7 +51,7 @@ static void gotsig(int sig ATTRIBUTE_UNUSED) | |||
51 | #define CONVERTED_TAB_SIZE 8 | 51 | #define CONVERTED_TAB_SIZE 8 |
52 | 52 | ||
53 | int more_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 53 | int more_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
54 | int more_main(int argc ATTRIBUTE_UNUSED, char **argv) | 54 | int more_main(int argc UNUSED_PARAM, char **argv) |
55 | { | 55 | { |
56 | int c = c; /* for gcc */ | 56 | int c = c; /* for gcc */ |
57 | int lines; | 57 | int lines; |
diff --git a/util-linux/mount.c b/util-linux/mount.c index 3b77af728..f73ad608b 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -47,7 +47,7 @@ | |||
47 | /* 16.12.2006, Sampo Kellomaki (sampo@iki.fi) | 47 | /* 16.12.2006, Sampo Kellomaki (sampo@iki.fi) |
48 | * dietlibc-0.30 does not have implementation of getmntent_r() */ | 48 | * dietlibc-0.30 does not have implementation of getmntent_r() */ |
49 | static struct mntent *getmntent_r(FILE* stream, struct mntent* result, | 49 | static struct mntent *getmntent_r(FILE* stream, struct mntent* result, |
50 | char* buffer ATTRIBUTE_UNUSED, int bufsize ATTRIBUTE_UNUSED) | 50 | char* buffer UNUSED_PARAM, int bufsize UNUSED_PARAM) |
51 | { | 51 | { |
52 | struct mntent* ment = getmntent(stream); | 52 | struct mntent* ment = getmntent(stream); |
53 | return memcpy(result, ment, sizeof(*ment)); | 53 | return memcpy(result, ment, sizeof(*ment)); |
@@ -914,7 +914,7 @@ static inline int daemonize(void) { return -ENOSYS; } | |||
914 | #endif | 914 | #endif |
915 | 915 | ||
916 | // TODO | 916 | // TODO |
917 | static inline int we_saw_this_host_before(const char *hostname ATTRIBUTE_UNUSED) | 917 | static inline int we_saw_this_host_before(const char *hostname UNUSED_PARAM) |
918 | { | 918 | { |
919 | return 0; | 919 | return 0; |
920 | } | 920 | } |
@@ -1733,7 +1733,7 @@ static int singlemount(struct mntent *mp, int ignore_busy) | |||
1733 | static const char must_be_root[] ALIGN1 = "you must be root"; | 1733 | static const char must_be_root[] ALIGN1 = "you must be root"; |
1734 | 1734 | ||
1735 | int mount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 1735 | int mount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
1736 | int mount_main(int argc ATTRIBUTE_UNUSED, char **argv) | 1736 | int mount_main(int argc UNUSED_PARAM, char **argv) |
1737 | { | 1737 | { |
1738 | char *cmdopts = xstrdup(""); | 1738 | char *cmdopts = xstrdup(""); |
1739 | char *fstype = NULL; | 1739 | char *fstype = NULL; |
diff --git a/util-linux/rdate.c b/util-linux/rdate.c index 9e7bdba35..0880edff5 100644 --- a/util-linux/rdate.c +++ b/util-linux/rdate.c | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | enum { RFC_868_BIAS = 2208988800UL }; | 13 | enum { RFC_868_BIAS = 2208988800UL }; |
14 | 14 | ||
15 | static void socket_timeout(int sig ATTRIBUTE_UNUSED) | 15 | static void socket_timeout(int sig UNUSED_PARAM) |
16 | { | 16 | { |
17 | bb_error_msg_and_die("timeout connecting to time server"); | 17 | bb_error_msg_and_die("timeout connecting to time server"); |
18 | } | 18 | } |
@@ -43,7 +43,7 @@ static time_t askremotedate(const char *host) | |||
43 | } | 43 | } |
44 | 44 | ||
45 | int rdate_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 45 | int rdate_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
46 | int rdate_main(int argc ATTRIBUTE_UNUSED, char **argv) | 46 | int rdate_main(int argc UNUSED_PARAM, char **argv) |
47 | { | 47 | { |
48 | time_t remote_time; | 48 | time_t remote_time; |
49 | unsigned long flags; | 49 | unsigned long flags; |
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c index cac5fa4a1..1c157120d 100644 --- a/util-linux/readprofile.c +++ b/util-linux/readprofile.c | |||
@@ -42,7 +42,7 @@ static const char defaultmap[] ALIGN1 = "/boot/System.map"; | |||
42 | static const char defaultpro[] ALIGN1 = "/proc/profile"; | 42 | static const char defaultpro[] ALIGN1 = "/proc/profile"; |
43 | 43 | ||
44 | int readprofile_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 44 | int readprofile_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
45 | int readprofile_main(int argc ATTRIBUTE_UNUSED, char **argv) | 45 | int readprofile_main(int argc UNUSED_PARAM, char **argv) |
46 | { | 46 | { |
47 | FILE *map; | 47 | FILE *map; |
48 | const char *mapFile, *proFile; | 48 | const char *mapFile, *proFile; |
diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c index 2b2634f0b..a9766caaa 100644 --- a/util-linux/rtcwake.c +++ b/util-linux/rtcwake.c | |||
@@ -98,7 +98,7 @@ static void setup_alarm(int fd, time_t *wakeup) | |||
98 | #define RTCWAKE_OPT_TIME 0x40 | 98 | #define RTCWAKE_OPT_TIME 0x40 |
99 | 99 | ||
100 | int rtcwake_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 100 | int rtcwake_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
101 | int rtcwake_main(int argc ATTRIBUTE_UNUSED, char **argv) | 101 | int rtcwake_main(int argc UNUSED_PARAM, char **argv) |
102 | { | 102 | { |
103 | unsigned opt; | 103 | unsigned opt; |
104 | const char *rtcname = NULL; | 104 | const char *rtcname = NULL; |
diff --git a/util-linux/script.c b/util-linux/script.c index e70294e6c..39ec546a7 100644 --- a/util-linux/script.c +++ b/util-linux/script.c | |||
@@ -15,13 +15,13 @@ | |||
15 | 15 | ||
16 | static smallint fd_count = 2; | 16 | static smallint fd_count = 2; |
17 | 17 | ||
18 | static void handle_sigchld(int sig ATTRIBUTE_UNUSED) | 18 | static void handle_sigchld(int sig UNUSED_PARAM) |
19 | { | 19 | { |
20 | fd_count = 0; | 20 | fd_count = 0; |
21 | } | 21 | } |
22 | 22 | ||
23 | int script_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 23 | int script_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
24 | int script_main(int argc ATTRIBUTE_UNUSED, char **argv) | 24 | int script_main(int argc UNUSED_PARAM, char **argv) |
25 | { | 25 | { |
26 | int opt; | 26 | int opt; |
27 | int mode; | 27 | int mode; |
diff --git a/util-linux/setarch.c b/util-linux/setarch.c index 1f979a73c..250a93823 100644 --- a/util-linux/setarch.c +++ b/util-linux/setarch.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include "libbb.h" | 12 | #include "libbb.h" |
13 | 13 | ||
14 | int setarch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 14 | int setarch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
15 | int setarch_main(int argc ATTRIBUTE_UNUSED, char **argv) | 15 | int setarch_main(int argc UNUSED_PARAM, char **argv) |
16 | { | 16 | { |
17 | int pers = -1; | 17 | int pers = -1; |
18 | 18 | ||
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index 6eafa3e21..863f7734a 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c | |||
@@ -69,7 +69,7 @@ static int do_em_all(void) | |||
69 | } | 69 | } |
70 | 70 | ||
71 | int swap_on_off_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 71 | int swap_on_off_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
72 | int swap_on_off_main(int argc ATTRIBUTE_UNUSED, char **argv) | 72 | int swap_on_off_main(int argc UNUSED_PARAM, char **argv) |
73 | { | 73 | { |
74 | int ret; | 74 | int ret; |
75 | 75 | ||
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index bae695b0b..1f6ec2dc7 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c | |||
@@ -65,7 +65,7 @@ static void delete_contents(const char *directory) | |||
65 | } | 65 | } |
66 | 66 | ||
67 | int switch_root_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 67 | int switch_root_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
68 | int switch_root_main(int argc ATTRIBUTE_UNUSED, char **argv) | 68 | int switch_root_main(int argc UNUSED_PARAM, char **argv) |
69 | { | 69 | { |
70 | char *newroot, *console = NULL; | 70 | char *newroot, *console = NULL; |
71 | struct stat st1, st2; | 71 | struct stat st1, st2; |
diff --git a/util-linux/umount.c b/util-linux/umount.c index 9fa3cd2d3..00f125334 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c | |||
@@ -15,7 +15,7 @@ | |||
15 | /* 16.12.2006, Sampo Kellomaki (sampo@iki.fi) | 15 | /* 16.12.2006, Sampo Kellomaki (sampo@iki.fi) |
16 | * dietlibc-0.30 does not have implementation of getmntent_r() */ | 16 | * dietlibc-0.30 does not have implementation of getmntent_r() */ |
17 | static struct mntent *getmntent_r(FILE* stream, struct mntent* result, | 17 | static struct mntent *getmntent_r(FILE* stream, struct mntent* result, |
18 | char* buffer ATTRIBUTE_UNUSED, int bufsize ATTRIBUTE_UNUSED) | 18 | char* buffer UNUSED_PARAM, int bufsize UNUSED_PARAM) |
19 | { | 19 | { |
20 | struct mntent* ment = getmntent(stream); | 20 | struct mntent* ment = getmntent(stream); |
21 | return memcpy(result, ment, sizeof(*ment)); | 21 | return memcpy(result, ment, sizeof(*ment)); |
@@ -37,7 +37,7 @@ static struct mntent *getmntent_r(FILE* stream, struct mntent* result, | |||
37 | //#define MNT_DETACH 0x00000002 /* Just detach from the tree */ | 37 | //#define MNT_DETACH 0x00000002 /* Just detach from the tree */ |
38 | 38 | ||
39 | int umount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 39 | int umount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
40 | int umount_main(int argc ATTRIBUTE_UNUSED, char **argv) | 40 | int umount_main(int argc UNUSED_PARAM, char **argv) |
41 | { | 41 | { |
42 | int doForce; | 42 | int doForce; |
43 | char *const path = xmalloc(PATH_MAX + 2); /* to save stack */ | 43 | char *const path = xmalloc(PATH_MAX + 2); /* to save stack */ |