*: rename ATTRIBUTE_XXX to just XXX.

This commit is contained in:
Denis Vlasenko 2008-07-05 09:18:54 +00:00
parent f6efccc065
commit a60f84ebf0
228 changed files with 479 additions and 479 deletions

View File

@ -11,7 +11,7 @@
#include "busybox.h"
#if ENABLE_BUILD_LIBBUSYBOX
int main(int argc ATTRIBUTE_UNUSED, char **argv)
int main(int argc UNUSED_PARAM, char **argv)
{
return lbb_main(argv);
}

View File

@ -165,7 +165,7 @@ USE_DESKTOP(long long) int unpack_bunzip2(void)
}
int bunzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int bunzip2_main(int argc ATTRIBUTE_UNUSED, char **argv)
int bunzip2_main(int argc UNUSED_PARAM, char **argv)
{
getopt32(argv, "cfvdt");
argv += optind;
@ -277,7 +277,7 @@ USE_DESKTOP(long long) int unpack_gunzip(void)
*/
int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int gunzip_main(int argc ATTRIBUTE_UNUSED, char **argv)
int gunzip_main(int argc UNUSED_PARAM, char **argv)
{
getopt32(argv, "cfvdtn");
argv += optind;
@ -315,7 +315,7 @@ USE_DESKTOP(long long) int unpack_unlzma(void)
}
int unlzma_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int unlzma_main(int argc ATTRIBUTE_UNUSED, char **argv)
int unlzma_main(int argc UNUSED_PARAM, char **argv)
{
getopt32(argv, "cf");
argv += optind;
@ -357,7 +357,7 @@ USE_DESKTOP(long long) int unpack_uncompress(void)
}
int uncompress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int uncompress_main(int argc ATTRIBUTE_UNUSED, char **argv)
int uncompress_main(int argc UNUSED_PARAM, char **argv)
{
getopt32(argv, "cf");
argv += optind;

View File

@ -33,7 +33,7 @@ typedef unsigned char Bool;
#define False ((Bool)0)
#if BZ_LIGHT_DEBUG
static void bz_assert_fail(int errcode) ATTRIBUTE_NORETURN;
static void bz_assert_fail(int errcode) NORETURN;
#define AssertH(cond, errcode) \
do { \
if (!(cond)) \
@ -170,7 +170,7 @@ typedef struct EState {
/* map of bytes used in block */
int32_t nInUse;
Bool inUse[256] __attribute__(( aligned(sizeof(long)) ));
Bool inUse[256] ALIGNED(sizeof(long));
uint8_t unseqToSeq[256];
/* stuff for coding the MTF values */

View File

@ -141,7 +141,7 @@ char* make_new_name_bzip2(char *filename)
}
int bzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int bzip2_main(int argc ATTRIBUTE_UNUSED, char **argv)
int bzip2_main(int argc UNUSED_PARAM, char **argv)
{
unsigned opt;

View File

@ -191,7 +191,7 @@ static int cpio_o(void)
#endif
int cpio_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cpio_main(int argc ATTRIBUTE_UNUSED, char **argv)
int cpio_main(int argc UNUSED_PARAM, char **argv)
{
archive_handle_t *archive_handle;
char *cpio_filename;

View File

@ -1583,7 +1583,7 @@ static void configure_package(deb_file_t *deb_file)
}
int dpkg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dpkg_main(int argc ATTRIBUTE_UNUSED, char **argv)
int dpkg_main(int argc UNUSED_PARAM, char **argv)
{
deb_file_t **deb_file = NULL;
status_node_t *status_node;

View File

@ -2043,7 +2043,7 @@ int gzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
#if ENABLE_GUNZIP
int gzip_main(int argc, char **argv)
#else
int gzip_main(int argc ATTRIBUTE_UNUSED, char **argv)
int gzip_main(int argc UNUSED_PARAM, char **argv)
#endif
{
unsigned opt;

View File

@ -244,7 +244,7 @@ static void huft_free_all(STATE_PARAM_ONLY)
inflate_codes_td = NULL;
}
static void abort_unzip(STATE_PARAM_ONLY) ATTRIBUTE_NORETURN;
static void abort_unzip(STATE_PARAM_ONLY) NORETURN;
static void abort_unzip(STATE_PARAM_ONLY)
{
huft_free_all(PASS_STATE_ONLY);

View File

@ -5,6 +5,6 @@
#include "libbb.h"
#include "unarchive.h"
void FAST_FUNC header_skip(const file_header_t *file_header ATTRIBUTE_UNUSED)
void FAST_FUNC header_skip(const file_header_t *file_header UNUSED_PARAM)
{
}

View File

@ -397,7 +397,7 @@ static int exclude_file(const llist_t *excluded_files, const char *file)
#endif
static int FAST_FUNC writeFileToTarball(const char *fileName, struct stat *statbuf,
void *userData, int depth ATTRIBUTE_UNUSED)
void *userData, int depth UNUSED_PARAM)
{
struct TarBallInfo *tbInfo = (struct TarBallInfo *) userData;
const char *header_name;
@ -800,7 +800,7 @@ static const char tar_longopts[] ALIGN1 =
#endif
int tar_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tar_main(int argc ATTRIBUTE_UNUSED, char **argv)
int tar_main(int argc UNUSED_PARAM, char **argv)
{
char FAST_FUNC (*get_header_ptr)(archive_handle_t *) = get_header_tar;
archive_handle_t *tar_handle;

View File

@ -51,13 +51,13 @@ typedef union {
uint16_t method; /* 4-5 */
uint16_t modtime; /* 6-7 */
uint16_t moddate; /* 8-9 */
uint32_t crc32 ATTRIBUTE_PACKED; /* 10-13 */
uint32_t cmpsize ATTRIBUTE_PACKED; /* 14-17 */
uint32_t ucmpsize ATTRIBUTE_PACKED; /* 18-21 */
uint32_t crc32 PACKED; /* 10-13 */
uint32_t cmpsize PACKED; /* 14-17 */
uint32_t ucmpsize PACKED; /* 18-21 */
uint16_t filename_len; /* 22-23 */
uint16_t extra_len; /* 24-25 */
} formatted ATTRIBUTE_PACKED;
} zip_header_t; /* ATTRIBUTE_PACKED - gcc 4.2.1 doesn't like it (spews warning) */
} formatted PACKED;
} zip_header_t; /* PACKED - gcc 4.2.1 doesn't like it (spews warning) */
/* Check the offset of the last element, not the length. This leniency
* allows for poor packing, whereby the overall struct may be too long,

View File

@ -13,7 +13,7 @@
#include "libbb.h"
int clear_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int clear_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
int clear_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
return printf("\033[H\033[J") != 6;
}

View File

@ -16,7 +16,7 @@
enum { VT_DISALLOCATE = 0x5608 }; /* free memory associated to vt */
int deallocvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int deallocvt_main(int argc ATTRIBUTE_UNUSED, char **argv)
int deallocvt_main(int argc UNUSED_PARAM, char **argv)
{
/* num = 0 deallocate all unused consoles */
int num = 0;

View File

@ -24,7 +24,7 @@ struct kbentry {
#define MAX_NR_KEYMAPS 256
int dumpkmap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dumpkmap_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv)
int dumpkmap_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
struct kbentry ke;
int i, j, fd;

View File

@ -14,7 +14,7 @@
#include <linux/kd.h>
int kbd_mode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int kbd_mode_main(int ATTRIBUTE_UNUSED argc, char **argv)
int kbd_mode_main(int argc UNUSED_PARAM, char **argv)
{
int fd;
unsigned opt;

View File

@ -167,7 +167,7 @@ static void loadnewfont(int fd)
}
int loadfont_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int loadfont_main(int argc, char **argv ATTRIBUTE_UNUSED)
int loadfont_main(int argc, char **argv UNUSED_PARAM)
{
int fd;

View File

@ -26,7 +26,7 @@ struct kbentry {
#define MAX_NR_KEYMAPS 256
int loadkmap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int loadkmap_main(int ATTRIBUTE_UNUSED argc, char **argv ATTRIBUTE_UNUSED)
int loadkmap_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
struct kbentry ke;
int i, j, fd;

View File

@ -105,7 +105,7 @@ static NOINLINE void vfork_child(char **argv)
}
int openvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int openvt_main(int argc ATTRIBUTE_UNUSED, char **argv)
int openvt_main(int argc UNUSED_PARAM, char **argv)
{
char vtname[sizeof(VC_FORMAT) + sizeof(int)*3];
struct vt_stat vtstat;

View File

@ -18,7 +18,7 @@ int stty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
#endif
int reset_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int reset_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
int reset_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
static const char *const args[] = {
"stty", "sane", NULL

View File

@ -14,14 +14,14 @@
#define old_termios (*(struct termios*)&bb_common_bufsiz1)
static void
onintr(int sig ATTRIBUTE_UNUSED)
onintr(int sig UNUSED_PARAM)
{
tcsetattr(STDERR_FILENO, TCSANOW, &old_termios);
exit(EXIT_FAILURE);
}
int resize_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int resize_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
int resize_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
struct termios new;
struct winsize w = { 0, 0, 0, 0 };

View File

@ -11,7 +11,7 @@
#include "libbb.h"
int setconsole_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int setconsole_main(int ATTRIBUTE_UNUSED argc, char **argv)
int setconsole_main(int argc UNUSED_PARAM, char **argv)
{
const char *device = CURRENT_TTY;
bool reset;

View File

@ -12,7 +12,7 @@
#include "libbb.h"
int setlogcons_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int setlogcons_main(int argc ATTRIBUTE_UNUSED, char **argv)
int setlogcons_main(int argc UNUSED_PARAM, char **argv)
{
struct {
char fn;

View File

@ -40,7 +40,7 @@ int bb_cat(char **argv)
}
int cat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cat_main(int argc ATTRIBUTE_UNUSED, char **argv)
int cat_main(int argc UNUSED_PARAM, char **argv)
{
getopt32(argv, "u");
argv += optind;

View File

@ -13,7 +13,7 @@
#include "libbb.h"
int catv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int catv_main(int argc ATTRIBUTE_UNUSED, char **argv)
int catv_main(int argc UNUSED_PARAM, char **argv)
{
int retval = EXIT_SUCCESS;
int fd;

View File

@ -68,7 +68,7 @@ static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf, void
}
int chmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chmod_main(int argc ATTRIBUTE_UNUSED, char **argv)
int chmod_main(int argc UNUSED_PARAM, char **argv)
{
int retval = EXIT_SUCCESS;
char *arg, **argp;

View File

@ -42,7 +42,7 @@ typedef int (*chown_fptr)(const char *, uid_t, gid_t);
static struct bb_uidgid_t ugid = { -1, -1 };
static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf,
void *cf, int depth ATTRIBUTE_UNUSED)
void *cf, int depth UNUSED_PARAM)
{
uid_t u = (ugid.uid == (uid_t)-1) ? statbuf->st_uid : ugid.uid;
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,
return FALSE;
}
int chown_main(int argc ATTRIBUTE_UNUSED, char **argv)
int chown_main(int argc UNUSED_PARAM, char **argv)
{
int retval = EXIT_SUCCESS;
int flags;

View File

@ -9,7 +9,7 @@
#include "libbb.h"
int cksum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cksum_main(int argc ATTRIBUTE_UNUSED, char **argv)
int cksum_main(int argc UNUSED_PARAM, char **argv)
{
uint32_t *crc32_table = crc32_filltable(NULL, 1);
uint32_t crc;

View File

@ -36,7 +36,7 @@ static void writeline(char *line, int class, int flags)
}
int comm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int comm_main(int argc ATTRIBUTE_UNUSED, char **argv)
int comm_main(int argc UNUSED_PARAM, char **argv)
{
#define LINE_LEN 100
#define BB_EOF_0 0x1

View File

@ -162,7 +162,7 @@ static void cut_file(FILE *file, char delim)
}
int cut_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cut_main(int argc ATTRIBUTE_UNUSED, char **argv)
int cut_main(int argc UNUSED_PARAM, char **argv)
{
char delim = '\t'; /* delimiter, default is tab */
char *sopt, *ltok;

View File

@ -39,7 +39,7 @@ static void maybe_set_utc(int opt)
}
int date_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int date_main(int argc ATTRIBUTE_UNUSED, char **argv)
int date_main(int argc UNUSED_PARAM, char **argv)
{
struct tm tm_time;
time_t tm;

View File

@ -41,7 +41,7 @@ struct globals {
#define INIT_G() memset(&G, 0, sizeof(G))
static void dd_output_status(int ATTRIBUTE_UNUSED cur_signal)
static void dd_output_status(int UNUSED_PARAM cur_signal)
{
/* Deliberately using %u, not %d */
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,
#endif
int dd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dd_main(int argc ATTRIBUTE_UNUSED, char **argv)
int dd_main(int argc UNUSED_PARAM, char **argv)
{
enum {
/* Must be in the same order as OP_conv_XXX! */

View File

@ -141,7 +141,7 @@ static unsigned long du(const char *filename)
}
int du_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int du_main(int argc ATTRIBUTE_UNUSED, char **argv)
int du_main(int argc UNUSED_PARAM, char **argv)
{
unsigned long total;
int slink_depth_save;

View File

@ -29,7 +29,7 @@
/* NB: can be used by shell even if not enabled as applet */
int echo_main(int argc ATTRIBUTE_UNUSED, char **argv)
int echo_main(int argc UNUSED_PARAM, char **argv)
{
const char *arg;
#if !ENABLE_FEATURE_FANCY_ECHO

View File

@ -39,7 +39,7 @@ static const char env_longopts[] ALIGN1 =
#endif
int env_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int env_main(int argc ATTRIBUTE_UNUSED, char **argv)
int env_main(int argc UNUSED_PARAM, char **argv)
{
/* cleanenv was static - why? */
char *cleanenv[1];

View File

@ -126,7 +126,7 @@ static void unexpand(FILE *file, unsigned int tab_size, unsigned opt)
#endif
int expand_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int expand_main(int argc ATTRIBUTE_UNUSED, char **argv)
int expand_main(int argc UNUSED_PARAM, char **argv)
{
/* Default 8 spaces for 1 tab */
const char *opt_t = "8";

View File

@ -15,7 +15,7 @@
/* This is a NOFORK applet. Be very careful! */
int false_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv)
int false_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
return EXIT_FAILURE;
}

View File

@ -14,7 +14,7 @@
/* This is a NOFORK applet. Be very careful! */
int hostid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv)
int hostid_main(int argc, char **argv UNUSED_PARAM)
{
if (argc > 1) {
bb_show_usage();

View File

@ -37,7 +37,7 @@ static int printf_full(unsigned int id, const char *arg, const char prefix)
}
int id_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int id_main(int argc ATTRIBUTE_UNUSED, char **argv)
int id_main(int argc UNUSED_PARAM, char **argv)
{
struct passwd *p;
uid_t uid;

View File

@ -25,7 +25,7 @@
/* This is a NOFORK applet. Be very careful! */
int logname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int logname_main(int argc, char ATTRIBUTE_UNUSED **argv)
int logname_main(int argc, char **argv UNUSED_PARAM)
{
char buf[128];

View File

@ -825,7 +825,7 @@ static const char ls_color_opt[] ALIGN1 =
int ls_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ls_main(int argc ATTRIBUTE_UNUSED, char **argv)
int ls_main(int argc UNUSED_PARAM, char **argv)
{
struct dnode **dnd;
struct dnode **dnf;

View File

@ -75,7 +75,7 @@ static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo)
}
int md5_sha1_sum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int md5_sha1_sum_main(int argc ATTRIBUTE_UNUSED, char **argv)
int md5_sha1_sum_main(int argc UNUSED_PARAM, char **argv)
{
int return_value = EXIT_SUCCESS;
uint8_t *hash_value;

View File

@ -14,7 +14,7 @@
#include "libcoreutils/coreutils.h"
int mkfifo_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mkfifo_main(int argc ATTRIBUTE_UNUSED, char **argv)
int mkfifo_main(int argc UNUSED_PARAM, char **argv)
{
mode_t mode;
int retval = EXIT_SUCCESS;

View File

@ -364,7 +364,7 @@ print_long_double(size_t n_bytes, const char *block, const char *fmt_string)
static void
print_named_ascii(size_t n_bytes, const char *block,
const char *unused_fmt_string ATTRIBUTE_UNUSED)
const char *unused_fmt_string UNUSED_PARAM)
{
/* Names for some non-printing characters. */
static const char charname[33][3] ALIGN1 = {
@ -404,7 +404,7 @@ print_named_ascii(size_t n_bytes, const char *block,
static void
print_ascii(size_t n_bytes, const char *block,
const char *unused_fmt_string ATTRIBUTE_UNUSED)
const char *unused_fmt_string UNUSED_PARAM)
{
// buf[N] pos: 01234 56789
char buf[12] = " x\0 0xx\0";
@ -814,7 +814,7 @@ skip(off_t n_skip)
typedef void FN_format_address(off_t address, char c);
static void
format_address_none(off_t address ATTRIBUTE_UNUSED, char c ATTRIBUTE_UNUSED)
format_address_none(off_t address UNUSED_PARAM, char c UNUSED_PARAM)
{
}

View File

@ -11,7 +11,7 @@
#include "libbb.h"
int printenv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int printenv_main(int argc ATTRIBUTE_UNUSED, char **argv)
int printenv_main(int argc UNUSED_PARAM, char **argv)
{
/* no variables specified, show whole env */
if (!argv[1]) {

View File

@ -279,7 +279,7 @@ static char **print_formatted(char *f, char **argv)
return argv;
}
int printf_main(int argc ATTRIBUTE_UNUSED, char **argv)
int printf_main(int argc UNUSED_PARAM, char **argv)
{
char *format;
char **argv2;

View File

@ -12,7 +12,7 @@
/* This is a NOFORK applet. Be very careful! */
int pwd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int pwd_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
int pwd_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
char *buf;

View File

@ -10,7 +10,7 @@
#include "libbb.h"
int readlink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int readlink_main(int argc ATTRIBUTE_UNUSED, char **argv)
int readlink_main(int argc UNUSED_PARAM, char **argv)
{
char *buf;
char *fname;

View File

@ -13,7 +13,7 @@
#include "libbb.h"
int realpath_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int realpath_main(int argc ATTRIBUTE_UNUSED, char **argv)
int realpath_main(int argc UNUSED_PARAM, char **argv)
{
int retval = EXIT_SUCCESS;

View File

@ -20,7 +20,7 @@
/* This is a NOFORK applet. Be very careful! */
int rm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int rm_main(int argc ATTRIBUTE_UNUSED, char **argv)
int rm_main(int argc UNUSED_PARAM, char **argv)
{
int status = 0;
int flags = 0;

View File

@ -19,7 +19,7 @@
#define IGNORE_NON_EMPTY 0x02
int rmdir_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int rmdir_main(int argc ATTRIBUTE_UNUSED, char **argv)
int rmdir_main(int argc UNUSED_PARAM, char **argv)
{
int status = EXIT_SUCCESS;
int flags;

View File

@ -34,7 +34,7 @@ static const struct suffix_mult sfx[] = {
#endif
int sleep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sleep_main(int argc ATTRIBUTE_UNUSED, char **argv)
int sleep_main(int argc UNUSED_PARAM, char **argv)
{
unsigned duration;

View File

@ -276,7 +276,7 @@ static unsigned str2u(char **str)
#endif
int sort_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sort_main(int argc ATTRIBUTE_UNUSED, char **argv)
int sort_main(int argc UNUSED_PARAM, char **argv)
{
FILE *fp, *outfile = stdout;
char *line, **lines = NULL;

View File

@ -56,7 +56,7 @@ enum { READ_BUFFER_SIZE = COMMON_BUFSIZE - 1 };
#define SPLIT_OPT_a (1<<2)
int split_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int split_main(int argc ATTRIBUTE_UNUSED, char **argv)
int split_main(int argc UNUSED_PARAM, char **argv)
{
unsigned suffix_len = 2;
char *pfx;

View File

@ -692,7 +692,7 @@ static void set_speed_or_die(enum speed_setting type, const char *const arg,
}
}
static ATTRIBUTE_NORETURN void perror_on_device_and_die(const char *fmt)
static NORETURN void perror_on_device_and_die(const char *fmt)
{
bb_perror_msg_and_die(fmt, G.device_name);
}
@ -851,7 +851,7 @@ static int recover_mode(const char *arg, struct termios *mode)
}
static void display_recoverable(const struct termios *mode,
int ATTRIBUTE_UNUSED dummy)
int UNUSED_PARAM dummy)
{
int i;
printf("%lx:%lx:%lx:%lx",

View File

@ -71,7 +71,7 @@ static unsigned sum_file(const char *file, unsigned type)
}
int sum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sum_main(int argc ATTRIBUTE_UNUSED, char **argv)
int sum_main(int argc UNUSED_PARAM, char **argv)
{
unsigned n;
unsigned type = SUM_BSD;

View File

@ -14,7 +14,7 @@
/* This is a NOFORK applet. Be very careful! */
int sync_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sync_main(int argc, char **argv ATTRIBUTE_UNUSED)
int sync_main(int argc, char **argv UNUSED_PARAM)
{
/* coreutils-6.9 compat */
bb_warn_ignoring_args(argc - 1);

View File

@ -26,7 +26,7 @@ struct lstring {
};
int tac_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tac_main(int argc ATTRIBUTE_UNUSED, char **argv)
int tac_main(int argc UNUSED_PARAM, char **argv)
{
char **name;
FILE *f;

View File

@ -187,7 +187,7 @@ extern struct test_statics *const test_ptr_to_statics;
static arith_t primary(enum token n);
static void syntax(const char *op, const char *msg) ATTRIBUTE_NORETURN;
static void syntax(const char *op, const char *msg) NORETURN;
static void syntax(const char *op, const char *msg)
{
if (op && *op) {

View File

@ -38,7 +38,7 @@
*/
int touch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int touch_main(int argc ATTRIBUTE_UNUSED, char **argv)
int touch_main(int argc UNUSED_PARAM, char **argv)
{
#if ENABLE_DESKTOP
struct utimbuf timebuf;

View File

@ -174,7 +174,7 @@ static int complement(char *buffer, int buffer_len)
}
int tr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tr_main(int argc ATTRIBUTE_UNUSED, char **argv)
int tr_main(int argc UNUSED_PARAM, char **argv)
{
int output_length = 0, input_length;
int i;

View File

@ -15,7 +15,7 @@
/* This is a NOFORK applet. Be very careful! */
int true_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int true_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
int true_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
return EXIT_SUCCESS;
}

View File

@ -13,7 +13,7 @@
#include "libbb.h"
int tty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tty_main(int argc, char **argv SKIP_INCLUDE_SUSv2(ATTRIBUTE_UNUSED))
int tty_main(int argc, char **argv SKIP_INCLUDE_SUSv2(UNUSED_PARAM))
{
const char *s;
USE_INCLUDE_SUSv2(int silent;) /* Note: No longer relevant in SUSv3. */

View File

@ -49,7 +49,7 @@ static const unsigned short utsname_offset[] = {
};
int uname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int uname_main(int argc ATTRIBUTE_UNUSED, char **argv)
int uname_main(int argc UNUSED_PARAM, char **argv)
{
uname_info_t uname_info;
#if defined(__sparc__) && defined(__linux__)

View File

@ -26,7 +26,7 @@ static FILE *xgetoptfile_uniq_s(char **argv, int read0write2)
}
int uniq_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int uniq_main(int argc ATTRIBUTE_UNUSED, char **argv)
int uniq_main(int argc UNUSED_PARAM, char **argv)
{
FILE *in, *out;
const char *s0, *e0, *s1, *e1, *input_filename;

View File

@ -14,7 +14,7 @@
/* This is a NOFORK applet. Be very careful! */
int usleep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int usleep_main(int argc ATTRIBUTE_UNUSED, char **argv)
int usleep_main(int argc UNUSED_PARAM, char **argv)
{
if (!argv[1]) {
bb_show_usage();

View File

@ -136,7 +136,7 @@ static void read_base64(FILE *src_stream, FILE *dst_stream)
}
int uudecode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int uudecode_main(int argc ATTRIBUTE_UNUSED, char **argv)
int uudecode_main(int argc UNUSED_PARAM, char **argv)
{
FILE *src_stream;
char *outname = NULL;

View File

@ -69,7 +69,7 @@ enum {
};
int wc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int wc_main(int argc ATTRIBUTE_UNUSED, char **argv)
int wc_main(int argc UNUSED_PARAM, char **argv)
{
FILE *fp;
const char *s, *arg;

View File

@ -41,7 +41,7 @@ static void idle_string(char *str6, time_t t)
}
int who_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int who_main(int argc ATTRIBUTE_UNUSED, char **argv)
int who_main(int argc UNUSED_PARAM, char **argv)
{
char str6[6];
struct utmp *ut;

View File

@ -14,7 +14,7 @@
/* This is a NOFORK applet. Be very careful! */
int whoami_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int whoami_main(int argc, char **argv ATTRIBUTE_UNUSED)
int whoami_main(int argc, char **argv UNUSED_PARAM)
{
if (argc > 1)
bb_show_usage();

View File

@ -35,7 +35,7 @@
#include "libbb.h"
int mktemp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mktemp_main(int argc ATTRIBUTE_UNUSED, char **argv)
int mktemp_main(int argc UNUSED_PARAM, char **argv)
{
const char *path;
char *chp;

View File

@ -15,7 +15,7 @@
* Activity is indicated by a '.' to stderr
*/
int pipe_progress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int pipe_progress_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
int pipe_progress_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
RESERVE_CONFIG_BUFFER(buf, PIPE_PROGRESS_SIZE);
time_t t = time(NULL);

View File

@ -77,7 +77,7 @@ static int bb_alphasort(const void *p1, const void *p2)
return (option_mask32 & OPT_r) ? -r : r;
}
static int FAST_FUNC act(const char *file, struct stat *statbuf, void *args ATTRIBUTE_UNUSED, int depth)
static int FAST_FUNC act(const char *file, struct stat *statbuf, void *args UNUSED_PARAM, int depth)
{
if (depth == 1)
return TRUE;
@ -111,7 +111,7 @@ static const char runparts_longopts[] ALIGN1 =
#endif
int run_parts_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int run_parts_main(int argc ATTRIBUTE_UNUSED, char **argv)
int run_parts_main(int argc UNUSED_PARAM, char **argv)
{
const char *umask_p = "22";
llist_t *arg_list = NULL;

View File

@ -320,7 +320,7 @@ static const char start_stop_daemon_longopts[] ALIGN1 =
#endif
int start_stop_daemon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int start_stop_daemon_main(int argc ATTRIBUTE_UNUSED, char **argv)
int start_stop_daemon_main(int argc UNUSED_PARAM, char **argv)
{
unsigned opt;
char *signame;

View File

@ -13,7 +13,7 @@
#include "libbb.h"
int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int which_main(int argc ATTRIBUTE_UNUSED, char **argv)
int which_main(int argc UNUSED_PARAM, char **argv)
{
USE_DESKTOP(int opt;)
int status = EXIT_SUCCESS;

View File

@ -125,7 +125,7 @@ static void change_attributes(const char *name, struct globals *gp)
}
int chattr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chattr_main(int argc ATTRIBUTE_UNUSED, char **argv)
int chattr_main(int argc UNUSED_PARAM, char **argv)
{
struct globals g;
char *arg;

View File

@ -1122,13 +1122,13 @@ static void parse_args(char **argv)
max_running = xatoi(tmp);
}
static void signal_cancel(int sig ATTRIBUTE_UNUSED)
static void signal_cancel(int sig UNUSED_PARAM)
{
cancel_requested = 1;
}
int fsck_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int fsck_main(int argc ATTRIBUTE_UNUSED, char **argv)
int fsck_main(int argc UNUSED_PARAM, char **argv)
{
int i, status;
/*int interactive;*/

View File

@ -58,7 +58,7 @@ static void list_attributes(const char *name)
}
static int lsattr_dir_proc(const char *dir_name, struct dirent *de,
void *private ATTRIBUTE_UNUSED)
void *private UNUSED_PARAM)
{
struct stat st;
char *path;
@ -96,7 +96,7 @@ static void lsattr_args(const char *name)
}
int lsattr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int lsattr_main(int argc ATTRIBUTE_UNUSED, char **argv)
int lsattr_main(int argc UNUSED_PARAM, char **argv)
{
getopt32(argv, "Radlv");
argv += optind;

View File

@ -54,7 +54,7 @@ typedef unsigned char uuid_t[16];
/* Allow UUID constants to be defined */
#ifdef __GNUC__
#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
static const uuid_t name ATTRIBUTE_UNUSED = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
static const uuid_t name UNUSED_PARAM = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
#else
#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \
static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}

View File

@ -499,7 +499,7 @@ static void chain_group(void);
static var *evaluate(node *, var *);
static rstream *next_input_file(void);
static int fmt_num(char *, int, const char *, double, int);
static int awk_exit(int) ATTRIBUTE_NORETURN;
static int awk_exit(int) NORETURN;
/* ---- error handling ---- */
@ -521,7 +521,7 @@ static void zero_out_var(var * vp)
memset(vp, 0, sizeof(*vp));
}
static void syntax_error(const char *const message) ATTRIBUTE_NORETURN;
static void syntax_error(const char *const message) NORETURN;
static void syntax_error(const char *const message)
{
bb_error_msg_and_die("%s:%i: %s", g_progname, g_lineno, message);

View File

@ -33,7 +33,7 @@ static const char opt_chars[] ALIGN1 = "sl";
#define CMP_OPT_l (1<<1)
int cmp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cmp_main(int argc ATTRIBUTE_UNUSED, char **argv)
int cmp_main(int argc UNUSED_PARAM, char **argv)
{
FILE *fp1, *fp2, *outfile = stdout;
const char *filename1, *filename2 = "-";

View File

@ -1164,9 +1164,9 @@ static void do_diff(char *dir1, char *path1, char *dir2, char *path2)
#if ENABLE_FEATURE_DIFF_DIR
/* This function adds a filename to dl, the directory listing. */
static int FAST_FUNC add_to_dirlist(const char *filename,
struct stat *sb ATTRIBUTE_UNUSED,
struct stat *sb UNUSED_PARAM,
void *userdata,
int depth ATTRIBUTE_UNUSED)
int depth UNUSED_PARAM)
{
/* +2: with space for eventual trailing NULL */
dl = xrealloc(dl, (dl_count+2) * sizeof(dl[0]));
@ -1271,7 +1271,7 @@ static void diffdir(char *p1, char *p2)
int diff_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int diff_main(int argc ATTRIBUTE_UNUSED, char **argv)
int diff_main(int argc UNUSED_PARAM, char **argv)
{
int gotstdin = 0;
char *f1, *f2;

View File

@ -89,7 +89,7 @@ static char *skip_blank(const char *cp)
int ed_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ed_main(int argc ATTRIBUTE_UNUSED, char **argv)
int ed_main(int argc UNUSED_PARAM, char **argv)
{
INIT_G();

View File

@ -66,7 +66,7 @@ static char *extract_filename(char *line, int patch_level, const char *pat)
}
int patch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int patch_main(int argc ATTRIBUTE_UNUSED, char **argv)
int patch_main(int argc UNUSED_PARAM, char **argv)
{
struct stat saved_stat;
char *patch_line;

View File

@ -1233,7 +1233,7 @@ static void add_cmd_block(char *cmdstr)
}
int sed_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sed_main(int argc ATTRIBUTE_UNUSED, char **argv)
int sed_main(int argc UNUSED_PARAM, char **argv)
{
enum {
OPT_in_place = 1 << 0,

View File

@ -2141,7 +2141,7 @@ static void cookmode(void)
//----- Come here when we get a window resize signal ---------
#if ENABLE_FEATURE_VI_USE_SIGNALS
static void winch_sig(int sig ATTRIBUTE_UNUSED)
static void winch_sig(int sig UNUSED_PARAM)
{
// FIXME: do it in main loop!!!
signal(SIGWINCH, winch_sig);
@ -2155,7 +2155,7 @@ static void winch_sig(int sig ATTRIBUTE_UNUSED)
}
//----- Come here when we get a continue signal -------------------
static void cont_sig(int sig ATTRIBUTE_UNUSED)
static void cont_sig(int sig UNUSED_PARAM)
{
rawmode(); // terminal to "raw"
last_status_cksum = 0; // force status update
@ -2167,7 +2167,7 @@ static void cont_sig(int sig ATTRIBUTE_UNUSED)
}
//----- Come here when we get a Suspend signal -------------------
static void suspend_sig(int sig ATTRIBUTE_UNUSED)
static void suspend_sig(int sig UNUSED_PARAM)
{
place_cursor(rows - 1, 0, FALSE); // go to bottom of screen
clear_to_eol(); // Erase to end of line

View File

@ -74,9 +74,9 @@ typedef struct {
#endif
} action;
#define ACTS(name, arg...) typedef struct { action a; arg; } action_##name;
#define ACTF(name) static int func_##name(const char *fileName ATTRIBUTE_UNUSED, \
struct stat *statbuf ATTRIBUTE_UNUSED, \
action_##name* ap ATTRIBUTE_UNUSED)
#define ACTF(name) static int func_##name(const char *fileName UNUSED_PARAM, \
struct stat *statbuf UNUSED_PARAM, \
action_##name* ap UNUSED_PARAM)
ACTS(print)
ACTS(name, const char *pattern; bool iname;)
USE_FEATURE_FIND_PATH( ACTS(path, const char *pattern;))
@ -376,8 +376,8 @@ ACTF(context)
static int FAST_FUNC fileAction(const char *fileName,
struct stat *statbuf,
void *userData SKIP_FEATURE_FIND_MAXDEPTH(ATTRIBUTE_UNUSED),
int depth SKIP_FEATURE_FIND_MAXDEPTH(ATTRIBUTE_UNUSED))
void *userData SKIP_FEATURE_FIND_MAXDEPTH(UNUSED_PARAM),
int depth SKIP_FEATURE_FIND_MAXDEPTH(UNUSED_PARAM))
{
int i;
#if ENABLE_FEATURE_FIND_MAXDEPTH

View File

@ -371,9 +371,9 @@ static void load_regexes_from_file(llist_t *fopt)
}
static int FAST_FUNC file_action_grep(const char *filename,
struct stat *statbuf ATTRIBUTE_UNUSED,
struct stat *statbuf UNUSED_PARAM,
void* matched,
int depth ATTRIBUTE_UNUSED)
int depth UNUSED_PARAM)
{
FILE *file = fopen(filename, "r");
if (file == NULL) {

View File

@ -292,7 +292,7 @@ static int xargs_ask_confirmation(void)
#if ENABLE_FEATURE_XARGS_SUPPORT_ZERO_TERM
static xlist_t *process0_stdin(xlist_t *list_arg,
const char *eof_str ATTRIBUTE_UNUSED, size_t mc, char *buf)
const char *eof_str UNUSED_PARAM, size_t mc, char *buf)
{
int c; /* current char */
char *s = NULL; /* start word */

View File

@ -295,7 +295,7 @@ extern off_t bb_copyfd_size(int fd1, int fd2, off_t size) FAST_FUNC;
extern void bb_copyfd_exact_size(int fd1, int fd2, off_t size) FAST_FUNC;
/* "short" copy can be detected by return value < size */
/* this helper yells "short read!" if param is not -1 */
extern void complain_copyfd_and_die(off_t sz) ATTRIBUTE_NORETURN FAST_FUNC;
extern void complain_copyfd_and_die(off_t sz) NORETURN FAST_FUNC;
extern char bb_process_escape_sequence(const char **ptr) FAST_FUNC;
/* xxxx_strip version can modify its parameter:
* "/" -> "/"
@ -365,7 +365,7 @@ void signal_no_SA_RESTART_empty_mask(int sig, void (*handler)(int)) FAST_FUNC;
/* syscalls like read() won't be interrupted (though select/poll will be): */
void signal_SA_RESTART_empty_mask(int sig, void (*handler)(int)) FAST_FUNC;
void wait_for_any_sig(void) FAST_FUNC;
void kill_myself_with_sig(int sig) ATTRIBUTE_NORETURN FAST_FUNC;
void kill_myself_with_sig(int sig) NORETURN FAST_FUNC;
void sig_block(int sig) FAST_FUNC;
void sig_unblock(int sig) FAST_FUNC;
/* Will do sigaction(signum, act, NULL): */
@ -611,7 +611,7 @@ extern char *bb_get_chunk_from_file(FILE *file, int *end) FAST_FUNC;
extern void die_if_ferror(FILE *file, const char *msg) FAST_FUNC;
extern void die_if_ferror_stdout(void) FAST_FUNC;
extern void xfflush_stdout(void) FAST_FUNC;
extern void fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN FAST_FUNC;
extern void fflush_stdout_and_exit(int retval) NORETURN FAST_FUNC;
extern int fclose_if_not_stdin(FILE *file) FAST_FUNC;
extern FILE *xfopen(const char *filename, const char *mode) FAST_FUNC;
/* Prints warning to stderr and returns NULL on failure: */
@ -789,7 +789,7 @@ enum {
# define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags)
# define bb_daemonize(flags) bb_daemonize_or_rexec(flags, bogus)
#else
void re_exec(char **argv) ATTRIBUTE_NORETURN FAST_FUNC;
void re_exec(char **argv) NORETURN FAST_FUNC;
void forkexit_or_rexec(char **argv) FAST_FUNC;
extern bool re_execed;
int BUG_fork_is_unavailable_on_nommu(void) FAST_FUNC;
@ -855,8 +855,8 @@ extern smallint logmode;
extern int die_sleep;
extern int xfunc_error_retval;
extern jmp_buf die_jmp;
extern void xfunc_die(void) ATTRIBUTE_NORETURN FAST_FUNC;
extern void bb_show_usage(void) ATTRIBUTE_NORETURN FAST_FUNC;
extern void xfunc_die(void) NORETURN FAST_FUNC;
extern void bb_show_usage(void) NORETURN FAST_FUNC;
extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC;
extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC;
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,
extern void bb_simple_perror_msg_and_die(const char *s) __attribute__ ((noreturn)) FAST_FUNC;
extern void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC;
extern void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC;
extern void bb_perror_nomsg_and_die(void) ATTRIBUTE_NORETURN FAST_FUNC;
extern void bb_perror_nomsg_and_die(void) NORETURN FAST_FUNC;
extern void bb_perror_nomsg(void) FAST_FUNC;
extern void bb_info_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC;
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;
extern int find_applet_by_name(const char *name) FAST_FUNC;
/* Returns only if applet is not found. */
extern void run_applet_and_exit(const char *name, char **argv) FAST_FUNC;
extern void run_applet_no_and_exit(int a, char **argv) ATTRIBUTE_NORETURN FAST_FUNC;
extern void run_applet_no_and_exit(int a, char **argv) NORETURN FAST_FUNC;
#endif
#ifdef HAVE_MNTENT_H
@ -1001,7 +1001,7 @@ char *bb_simplify_path(const char *path) FAST_FUNC;
#define FAIL_DELAY 3
extern void bb_do_delay(int seconds) FAST_FUNC;
extern void change_identity(const struct passwd *pw) FAST_FUNC;
extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) ATTRIBUTE_NORETURN FAST_FUNC;
extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) NORETURN FAST_FUNC;
extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) FAST_FUNC;
#if ENABLE_SELINUX
extern void renew_current_security_context(void) FAST_FUNC;

View File

@ -48,27 +48,27 @@
# define __const const
#endif
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
#define ATTRIBUTE_PACKED __attribute__ ((__packed__))
#define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m)))
#define UNUSED_PARAM __attribute__ ((__unused__))
#define NORETURN __attribute__ ((__noreturn__))
#define PACKED __attribute__ ((__packed__))
#define ALIGNED(m) __attribute__ ((__aligned__(m)))
/* __NO_INLINE__: some gcc's do not honor inlining! :( */
#if __GNUC_PREREQ(3,0) && !defined(__NO_INLINE__)
# define ALWAYS_INLINE __attribute__ ((always_inline)) inline
/* I've seen a toolchain where I needed __noinline__ instead of noinline */
# define NOINLINE __attribute__((__noinline__))
# if !ENABLE_WERROR
# define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
# define ATTRIBUTE_UNUSED_RESULT __attribute__ ((warn_unused_result))
# define DEPRECATED __attribute__ ((__deprecated__))
# define UNUSED_PARAM_RESULT __attribute__ ((warn_unused_result))
# else
# define ATTRIBUTE_DEPRECATED /* n/a */
# define ATTRIBUTE_UNUSED_RESULT /* n/a */
# define DEPRECATED /* n/a */
# define UNUSED_PARAM_RESULT /* n/a */
# endif
#else
# define ALWAYS_INLINE inline /* n/a */
# define NOINLINE /* n/a */
# define ATTRIBUTE_DEPRECATED /* n/a */
# define ATTRIBUTE_UNUSED_RESULT /* n/a */
# define DEPRECATED /* n/a */
# define UNUSED_PARAM_RESULT /* n/a */
#endif
/* -fwhole-program makes all symbols local. The attribute externally_visible

View File

@ -16,7 +16,7 @@
#endif
int halt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int halt_main(int argc ATTRIBUTE_UNUSED, char **argv)
int halt_main(int argc UNUSED_PARAM, char **argv)
{
static const int magic[] = {
#ifdef RB_HALT_SYSTEM

View File

@ -96,7 +96,7 @@ static const char *const environment[] = {
/* Function prototypes */
static void delete_init_action(struct init_action *a);
static void halt_reboot_pwoff(int sig) ATTRIBUTE_NORETURN;
static void halt_reboot_pwoff(int sig) NORETURN;
static void waitfor(pid_t pid)
{
@ -110,7 +110,7 @@ static void waitfor(pid_t pid)
continue;
}
static void loop_forever(void) ATTRIBUTE_NORETURN;
static void loop_forever(void) NORETURN;
static void loop_forever(void)
{
while (1)
@ -594,7 +594,7 @@ static void halt_reboot_pwoff(int sig)
/* Handler for QUIT - exec "restart" action,
* else (no such action defined) do nothing */
static void exec_restart_action(int sig ATTRIBUTE_UNUSED)
static void exec_restart_action(int sig UNUSED_PARAM)
{
struct init_action *a;
@ -617,13 +617,13 @@ static void exec_restart_action(int sig ATTRIBUTE_UNUSED)
}
}
static void ctrlaltdel_signal(int sig ATTRIBUTE_UNUSED)
static void ctrlaltdel_signal(int sig UNUSED_PARAM)
{
run_actions(CTRLALTDEL);
}
/* The SIGSTOP & SIGTSTP handler */
static void stop_handler(int sig ATTRIBUTE_UNUSED)
static void stop_handler(int sig UNUSED_PARAM)
{
int saved_errno = errno;
@ -635,7 +635,7 @@ static void stop_handler(int sig ATTRIBUTE_UNUSED)
}
/* The SIGCONT handler */
static void cont_handler(int sig ATTRIBUTE_UNUSED)
static void cont_handler(int sig UNUSED_PARAM)
{
got_cont = 1;
}
@ -790,7 +790,7 @@ static void parse_inittab(void)
}
#if ENABLE_FEATURE_USE_INITTAB
static void reload_signal(int sig ATTRIBUTE_UNUSED)
static void reload_signal(int sig UNUSED_PARAM)
{
struct init_action *a, *tmp;
@ -838,7 +838,7 @@ static void reload_signal(int sig ATTRIBUTE_UNUSED)
#endif
int init_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int init_main(int argc ATTRIBUTE_UNUSED, char **argv)
int init_main(int argc UNUSED_PARAM, char **argv)
{
struct init_action *a;
pid_t wpid;

View File

@ -738,7 +738,7 @@ void FAST_FUNC run_applet_and_exit(const char *name, char **argv)
#if ENABLE_BUILD_LIBBUSYBOX
int lbb_main(char **argv)
#else
int main(int argc ATTRIBUTE_UNUSED, char **argv)
int main(int argc UNUSED_PARAM, char **argv)
#endif
{
#if defined(SINGLE_APPLET_MAIN)

View File

@ -13,7 +13,7 @@
#include "libbb.h"
/* do nothing signal handler */
static void askpass_timeout(int ATTRIBUTE_UNUSED ignore)
static void askpass_timeout(int UNUSED_PARAM ignore)
{
}

View File

@ -70,4 +70,4 @@ const char bb_path_wtmp_file[] ALIGN1 =
/* We use it for "global" data via *(struct global*)&bb_common_bufsiz1.
* Since gcc insists on aligning struct global's members, it would be a pity
* (and an alignment fault on some CPUs) to mess it up. */
char bb_common_bufsiz1[COMMON_BUFSIZE] __attribute__(( aligned(sizeof(long long)) ));
char bb_common_bufsiz1[COMMON_BUFSIZE] ALIGNED(sizeof(long long));

View File

@ -22,10 +22,10 @@
* is so stinking huge.
*/
static int FAST_FUNC true_action(const char *fileName ATTRIBUTE_UNUSED,
struct stat *statbuf ATTRIBUTE_UNUSED,
void* userData ATTRIBUTE_UNUSED,
int depth ATTRIBUTE_UNUSED)
static int FAST_FUNC true_action(const char *fileName UNUSED_PARAM,
struct stat *statbuf UNUSED_PARAM,
void* userData UNUSED_PARAM,
int depth UNUSED_PARAM)
{
return TRUE;
}

View File

@ -123,7 +123,7 @@ static void add_user_to_group(char **args,
* will add an existing user to an existing group.
*/
int addgroup_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int addgroup_main(int argc ATTRIBUTE_UNUSED, char **argv)
int addgroup_main(int argc UNUSED_PARAM, char **argv)
{
char *group;
gid_t gid = 0;

View File

@ -56,7 +56,7 @@ static void addgroup_wrapper(struct passwd *p)
free(cmd);
}
static void passwd_wrapper(const char *login) ATTRIBUTE_NORETURN;
static void passwd_wrapper(const char *login) NORETURN;
static void passwd_wrapper(const char *login)
{
@ -85,7 +85,7 @@ static const char adduser_longopts[] ALIGN1 =
* can be customized via command-line parameters.
*/
int adduser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int adduser_main(int argc ATTRIBUTE_UNUSED, char **argv)
int adduser_main(int argc UNUSED_PARAM, char **argv)
{
struct passwd pw;
const char *usegroup = NULL;

View File

@ -19,7 +19,7 @@ static const char chpasswd_longopts[] ALIGN1 =
#define OPT_MD5 2
int chpasswd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chpasswd_main(int argc ATTRIBUTE_UNUSED, char **argv)
int chpasswd_main(int argc UNUSED_PARAM, char **argv)
{
char *name, *pass;
char salt[sizeof("$N$XXXXXXXX")];

View File

@ -32,7 +32,7 @@ done
*/
int cryptpw_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cryptpw_main(int argc ATTRIBUTE_UNUSED, char **argv)
int cryptpw_main(int argc UNUSED_PARAM, char **argv)
{
char salt[sizeof("$N$XXXXXXXX")];
char *opt_a;

Some files were not shown because too many files have changed in this diff Show More