#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);
}
}
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;
*/
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;
}
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;
}
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;
#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)) \
/* 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 */
}
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;
#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;
}
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;
#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;
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);
#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)
{
}
#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;
#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;
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,
#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;
}
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;
#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;
#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;
}
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;
#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;
}
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;
#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
#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 };
#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;
#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;
}
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;
#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;
}
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;
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;
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;
#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;
}
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
}
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;
}
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;
#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"
#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! */
}
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;
/* 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
#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];
#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";
/* 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;
}
/* 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();
}
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;
/* 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];
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;
}
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;
#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;
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 = {
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";
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)
{
}
#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]) {
return argv;
}
-int printf_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int printf_main(int argc UNUSED_PARAM, char **argv)
{
char *format;
char **argv2;
/* 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;
#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;
#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;
/* 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;
#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;
#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;
#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;
#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;
}
}
-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);
}
}
static void display_recoverable(const struct termios *mode,
- int ATTRIBUTE_UNUSED dummy)
+ int UNUSED_PARAM dummy)
{
int i;
printf("%lx:%lx:%lx:%lx",
}
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;
/* 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);
};
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;
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) {
*/
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;
}
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;
/* 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;
}
#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. */
};
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__)
}
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;
/* 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();
}
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;
};
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;
}
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;
/* 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();
#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;
* 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);
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;
#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;
#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;
#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;
}
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;
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;*/
}
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;
}
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;
dev = CreateFile(file, GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE ,
- NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (dev == INVALID_HANDLE_VALUE)
return EBADF;
/* 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}
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 ---- */
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);
#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 = "-";
#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]));
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;
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();
}
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;
}
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,
//----- 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);
}
//----- 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
}
//----- 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
#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;))
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
}
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) {
#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 */
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:
* "/" -> "/"
/* 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): */
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: */
# 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;
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;
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;
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
#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;
# 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
#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
/* 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)
{
continue;
}
-static void loop_forever(void) ATTRIBUTE_NORETURN;
+static void loop_forever(void) NORETURN;
static void loop_forever(void)
{
while (1)
/* 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;
}
}
-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;
}
/* The SIGCONT handler */
-static void cont_handler(int sig ATTRIBUTE_UNUSED)
+static void cont_handler(int sig UNUSED_PARAM)
{
got_cont = 1;
}
}
#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;
#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;
#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)
#include "libbb.h"
/* do nothing signal handler */
-static void askpass_timeout(int ATTRIBUTE_UNUSED ignore)
+static void askpass_timeout(int UNUSED_PARAM ignore)
{
}
/* 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));
* 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;
}
* 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;
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)
{
* 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;
#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")];
*/
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;
#endif /* CONFIG_FEATURE_UTMP */
int getty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int getty_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int getty_main(int argc UNUSED_PARAM, char **argv)
{
int n;
char *fakehost = NULL; /* Fake hostname for ut_host */
}
}
-static void alarm_handler(int sig ATTRIBUTE_UNUSED)
+static void alarm_handler(int sig UNUSED_PARAM)
{
/* This is the escape hatch! Poor serial line users and the like
* arrive here when their connection is broken.
}
int login_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int login_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int login_main(int argc UNUSED_PARAM, char **argv)
{
enum {
LOGIN_OPT_f = (1<<0),
}
int passwd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int passwd_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int passwd_main(int argc UNUSED_PARAM, char **argv)
{
enum {
OPT_algo = 0x1, /* -a - password algorithm */
#define SU_OPT_l (4)
int su_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int su_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int su_main(int argc UNUSED_PARAM, char **argv)
{
unsigned flags;
char *opt_shell = NULL;
#include "libbb.h"
#include <syslog.h>
-//static void catchalarm(int ATTRIBUTE_UNUSED junk)
+//static void catchalarm(int UNUSED_PARAM junk)
//{
// exit(EXIT_FAILURE);
//}
int sulogin_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int sulogin_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int sulogin_main(int argc UNUSED_PARAM, char **argv)
{
char *cp;
int timeout = 0;
#include <sys/vt.h>
#include "libbb.h"
-static void release_vt(int signo ATTRIBUTE_UNUSED)
+static void release_vt(int signo UNUSED_PARAM)
{
/* If -a, param is 0, which means:
* "no, kernel, we don't allow console switch away from us!" */
ioctl(STDIN_FILENO, VT_RELDISP, (unsigned long) !option_mask32);
}
-static void acquire_vt(int signo ATTRIBUTE_UNUSED)
+static void acquire_vt(int signo UNUSED_PARAM)
{
/* ACK to kernel that switch to console is successful */
ioctl(STDIN_FILENO, VT_RELDISP, VT_ACKACQ);
}
int vlock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int vlock_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int vlock_main(int argc UNUSED_PARAM, char **argv)
{
struct vt_mode vtm;
struct termios term;
#include "bbconfigopts.h"
int bbconfig_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int bbconfig_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+int bbconfig_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
printf(bbconfig_config);
return 0;
static /*volatile*/ smallint exitcode;
// trap for critical signals
-static void signal_handler(ATTRIBUTE_UNUSED int signo)
+static void signal_handler(UNUSED_PARAM int signo)
{
// report I/O error condition
exitcode = ERR_IO;
int chat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int chat_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int chat_main(int argc UNUSED_PARAM, char **argv)
{
// should we dump device output? to what fd? by default no.
// this can be controlled later via ECHO {ON|OFF} chat directive
#define OPT_o (1<<4)
int chrt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int chrt_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int chrt_main(int argc UNUSED_PARAM, char **argv)
{
pid_t pid = 0;
unsigned opt;
}
int crond_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int crond_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int crond_main(int argc UNUSED_PARAM, char **argv)
{
unsigned opt;
}
int crontab_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int crontab_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int crontab_main(int argc UNUSED_PARAM, char **argv)
{
const struct passwd *pas;
const char *crontab_dir = CRONTABS;
}
int dc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int dc_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int dc_main(int argc UNUSED_PARAM, char **argv)
{
INIT_G();
} /* End Function action_permissions */
static void action_modload(const struct devfsd_notify_struct *info,
- const struct config_entry_struct *entry ATTRIBUTE_UNUSED)
+ const struct config_entry_struct *entry UNUSED_PARAM)
/* [SUMMARY] Load a module.
<info> The devfs change.
<entry> The config file entry.
}
int eject_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int eject_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int eject_main(int argc UNUSED_PARAM, char **argv)
{
unsigned flags;
const char *device;
int fbsplash_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int fbsplash_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int fbsplash_main(int argc UNUSED_PARAM, char **argv)
{
const char *fb_device, *cfg_filename, *fifo_filename;
FILE *fp = fp; // for compiler
;
// Parse 512 byte disk identification block and print much crap.
-static void identify(uint16_t *val) ATTRIBUTE_NORETURN;
+static void identify(uint16_t *val) NORETURN;
static void identify(uint16_t *val)
{
uint16_t ii, jj, kk;
bb_error_msg_and_die("bad char: '%c' 0x%02x", c, c);
}
-static void identify_from_stdin(void) ATTRIBUTE_NORETURN;
+static void identify_from_stdin(void) NORETURN;
static void identify_from_stdin(void)
{
uint16_t sbuf[256];
extern int inotify_add_watch(int fd, const char *path, uint32_t mask);
int inotifyd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int inotifyd_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int inotifyd_main(int argc UNUSED_PARAM, char **argv)
{
unsigned mask = IN_ALL_EVENTS; // assume we want all events
struct pollfd pfd;
#endif
int last_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int last_main(int argc, char **argv ATTRIBUTE_UNUSED)
+int last_main(int argc, char **argv UNUSED_PARAM)
{
struct utmp ut;
int n, file = STDIN_FILENO;
}
int last_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int last_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int last_main(int argc UNUSED_PARAM, char **argv)
{
struct utmp ut;
const char *filename = _PATH_WTMP;
}
int man_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int man_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int man_main(int argc UNUSED_PARAM, char **argv)
{
FILE *cf;
const char *pager;
}
int microcom_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int microcom_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int microcom_main(int argc UNUSED_PARAM, char **argv)
{
int sfd;
int nfd;
"weof" "\0";
int mt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int mt_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int mt_main(int argc UNUSED_PARAM, char **argv)
{
const char *file = "/dev/tape";
struct mtop op;
} /* for (;;) */
}
-static void sigalrm_handler(int ATTRIBUTE_UNUSED signum)
+static void sigalrm_handler(int UNUSED_PARAM signum)
{
}
#include "libbb.h"
int setsid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int setsid_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int setsid_main(int argc UNUSED_PARAM, char **argv)
{
if (!argv[1])
bb_show_usage();
#define SIZE 8
int strings_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int strings_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int strings_main(int argc UNUSED_PARAM, char **argv)
{
int n, c, status = EXIT_SUCCESS;
unsigned opt;
int taskset_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int taskset_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int taskset_main(int argc UNUSED_PARAM, char **argv)
{
cpu_set_t mask;
pid_t pid = 0;
}
int time_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int time_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int time_main(int argc UNUSED_PARAM, char **argv)
{
resource_t res;
const char *output_format = default_format;
#define OPT_FOREGROUND 0x01
#define OPT_TIMER 0x02
-static void watchdog_shutdown(int sig ATTRIBUTE_UNUSED)
+static void watchdog_shutdown(int sig UNUSED_PARAM)
{
static const char V = 'V';
return ptr;
}
static int FAST_FUNC fileAction(const char *fname, struct stat *sb,
- void ATTRIBUTE_UNUSED *data, int ATTRIBUTE_UNUSED depth)
+ void UNUSED_PARAM *data, int UNUSED_PARAM depth)
{
size_t len = sb->st_size;
void *the_module;
}
int depmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int depmod_main(int ATTRIBUTE_UNUSED argc, char **argv)
+int depmod_main(int argc UNUSED_PARAM, char **argv)
{
int ret;
size_t moddir_base_len = 0; /* length of the "-b basedir" */
static int FAST_FUNC check_module_name_match(const char *filename,
- struct stat *statbuf ATTRIBUTE_UNUSED,
- void *userdata, int depth ATTRIBUTE_UNUSED)
+ struct stat *statbuf UNUSED_PARAM,
+ void *userdata, int depth UNUSED_PARAM)
{
char *fullname = (char *) userdata;
char *tmp;
/*======================================================================*/
-static struct obj_file *obj_load(FILE *fp, int loadprogbits ATTRIBUTE_UNUSED)
+static struct obj_file *obj_load(FILE *fp, int loadprogbits UNUSED_PARAM)
{
struct obj_file *f;
ElfW(Shdr) * section_headers;
#if !ENABLE_FEATURE_2_4_MODULES
int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int insmod_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int insmod_main(int argc UNUSED_PARAM, char **argv)
#else
-static int insmod_ng_main(int argc ATTRIBUTE_UNUSED, char **argv)
+static int insmod_ng_main(int argc UNUSED_PARAM, char **argv)
#endif
{
size_t len;
};
int lsmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int lsmod_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+int lsmod_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
struct module_info info;
char *module_names, *mn, *deps, *dn;
#else /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */
int lsmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int lsmod_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+int lsmod_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
FILE *file = xfopen("/proc/modules", "r");
}
static FAST_FUNC int fileAction(const char *pathname,
- struct stat *sb ATTRIBUTE_UNUSED,
+ struct stat *sb UNUSED_PARAM,
void *data,
- int depth ATTRIBUTE_UNUSED)
+ int depth UNUSED_PARAM)
{
int cur;
char *name;
*/
int modprobe_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int modprobe_main(int ATTRIBUTE_UNUSED argc, char **argv)
+int modprobe_main(int argc UNUSED_PARAM, char **argv)
{
struct utsname uts;
char applet0 = applet_name[0];
}
int arp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int arp_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int arp_main(int argc UNUSED_PARAM, char **argv)
{
char *hw_type;
char *protocol;
return err;
}
-static void finish(void) ATTRIBUTE_NORETURN;
+static void finish(void) NORETURN;
static void finish(void)
{
if (!(option_mask32 & QUIET)) {
}
int arping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int arping_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int arping_main(int argc UNUSED_PARAM, char **argv)
{
const char *device = "eth0";
char *source = NULL;
int brctl_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int brctl_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int brctl_main(int argc UNUSED_PARAM, char **argv)
{
static const char keywords[] ALIGN1 =
"addbr\0" "delbr\0" "addif\0" "delif\0"
}
int dnsd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int dnsd_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int dnsd_main(int argc UNUSED_PARAM, char **argv)
{
const char *listen_interface = "0.0.0.0";
char *sttl, *sport;
}
int ether_wake_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int ether_wake_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int ether_wake_main(int argc UNUSED_PARAM, char **argv)
{
const char *ifname = "eth0";
char *pass;
#define INIT_G() do { } while (0)
-static void ftp_die(const char *msg) ATTRIBUTE_NORETURN;
+static void ftp_die(const char *msg) NORETURN;
static void ftp_die(const char *msg)
{
char *cp = buf; /* buf holds peer's response */
#endif
int ftpgetput_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int ftpgetput_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int ftpgetput_main(int argc UNUSED_PARAM, char **argv)
{
unsigned opt;
const char *port = "ftp";
SEND_BODY = (1 << 1),
SEND_HEADERS_AND_BODY = SEND_HEADERS + SEND_BODY,
};
-static void send_file_and_exit(const char *url, int what) ATTRIBUTE_NORETURN;
+static void send_file_and_exit(const char *url, int what) NORETURN;
static void free_llist(has_next_ptr **pptr)
{
/*
* Log the connection closure and exit.
*/
-static void log_and_exit(void) ATTRIBUTE_NORETURN;
+static void log_and_exit(void) NORETURN;
static void log_and_exit(void)
{
/* Paranoia. IE said to be buggy. It may send some extra data
}
}
-static void send_headers_and_exit(int responseNum) ATTRIBUTE_NORETURN;
+static void send_headers_and_exit(int responseNum) NORETURN;
static void send_headers_and_exit(int responseNum)
{
send_headers(responseNum);
#if ENABLE_FEATURE_HTTPD_CGI || ENABLE_FEATURE_HTTPD_PROXY
/* gcc 4.2.1 fares better with NOINLINE */
-static NOINLINE void cgi_io_loop_and_exit(int fromCgi_rd, int toCgi_wr, int post_len) ATTRIBUTE_NORETURN;
+static NOINLINE void cgi_io_loop_and_exit(int fromCgi_rd, int toCgi_wr, int post_len) NORETURN;
static NOINLINE void cgi_io_loop_and_exit(int fromCgi_rd, int toCgi_wr, int post_len)
{
enum { FROM_CGI = 1, TO_CGI = 2 }; /* indexes in pfd[] */
const char *request,
int post_len,
const char *cookie,
- const char *content_type) ATTRIBUTE_NORETURN;
+ const char *content_type) NORETURN;
static void send_cgi_and_exit(
const char *url,
const char *request,
/*
* Handle timeouts
*/
-static void exit_on_signal(int sig) ATTRIBUTE_NORETURN;
-static void exit_on_signal(int sig ATTRIBUTE_UNUSED)
+static void exit_on_signal(int sig) NORETURN;
+static void exit_on_signal(int sig UNUSED_PARAM)
{
send_headers_and_exit(HTTP_REQUEST_TIMEOUT);
}
/*
* Handle an incoming http request and exit.
*/
-static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr) ATTRIBUTE_NORETURN;
+static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr) NORETURN;
static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr)
{
static const char request_GET[] ALIGN1 = "GET";
* Never returns.
*/
#if BB_MMU
-static void mini_httpd(int server_socket) ATTRIBUTE_NORETURN;
+static void mini_httpd(int server_socket) NORETURN;
static void mini_httpd(int server_socket)
{
/* NB: it's best to not use xfuncs in this loop before fork().
/* never reached */
}
#else
-static void mini_httpd_nommu(int server_socket, int argc, char **argv) ATTRIBUTE_NORETURN;
+static void mini_httpd_nommu(int server_socket, int argc, char **argv) NORETURN;
static void mini_httpd_nommu(int server_socket, int argc, char **argv)
{
char *argv_copy[argc + 2];
* Process a HTTP connection on stdin/out.
* Never returns.
*/
-static void mini_httpd_inetd(void) ATTRIBUTE_NORETURN;
+static void mini_httpd_inetd(void) NORETURN;
static void mini_httpd_inetd(void)
{
len_and_sockaddr fromAddr;
int httpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int httpd_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int httpd_main(int argc UNUSED_PARAM, char **argv)
{
int server_socket = server_socket; /* for gcc */
unsigned opt;
}
int ifenslave_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int ifenslave_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int ifenslave_main(int argc UNUSED_PARAM, char **argv)
{
char *master_ifname, *slave_ifname;
int rv;
ifd, exec);
}
#else
-static int dhcp_up(struct interface_defn_t *ifd ATTRIBUTE_UNUSED,
- execfn *exec ATTRIBUTE_UNUSED)
+static int dhcp_up(struct interface_defn_t *ifd UNUSED_PARAM,
+ execfn *exec UNUSED_PARAM)
{
return 0; /* no dhcp support */
}
"`cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
}
#else
-static int dhcp_down(struct interface_defn_t *ifd ATTRIBUTE_UNUSED,
- execfn *exec ATTRIBUTE_UNUSED)
+static int dhcp_down(struct interface_defn_t *ifd UNUSED_PARAM,
+ execfn *exec UNUSED_PARAM)
{
return 0; /* no dhcp support */
}
#endif
-static int manual_up_down(struct interface_defn_t *ifd ATTRIBUTE_UNUSED, execfn *exec ATTRIBUTE_UNUSED)
+static int manual_up_down(struct interface_defn_t *ifd UNUSED_PARAM, execfn *exec UNUSED_PARAM)
{
return 1;
}
return 1;
}
-static void reread_config_file(int sig ATTRIBUTE_UNUSED)
+static void reread_config_file(int sig UNUSED_PARAM)
{
servtab_t *sep, *cp, **sepp;
len_and_sockaddr *lsa;
restore_sigmask(&omask);
}
-static void reap_child(int sig ATTRIBUTE_UNUSED)
+static void reap_child(int sig UNUSED_PARAM)
{
pid_t pid;
int status;
errno = save_errno;
}
-static void retry_network_setup(int sig ATTRIBUTE_UNUSED)
+static void retry_network_setup(int sig UNUSED_PARAM)
{
servtab_t *sep;
}
}
-static void clean_up_and_exit(int sig ATTRIBUTE_UNUSED)
+static void clean_up_and_exit(int sig UNUSED_PARAM)
{
servtab_t *sep;
}
int inetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int inetd_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int inetd_main(int argc UNUSED_PARAM, char **argv)
{
struct sigaction sa, saved_pipe_handler;
servtab_t *sep, *sep2;
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO
/* Echo service -- echo data back. */
/* ARGSUSED */
-static void echo_stream(int s, servtab_t *sep ATTRIBUTE_UNUSED)
+static void echo_stream(int s, servtab_t *sep UNUSED_PARAM)
{
#if BB_MMU
while (1) {
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD
/* Discard service -- ignore data. MMU arches only. */
/* ARGSUSED */
-static void discard_stream(int s, servtab_t *sep ATTRIBUTE_UNUSED)
+static void discard_stream(int s, servtab_t *sep UNUSED_PARAM)
{
#if BB_MMU
while (safe_read(s, line, LINE_SIZE) > 0)
#endif
}
/* ARGSUSED */
-static void discard_dg(int s, servtab_t *sep ATTRIBUTE_UNUSED)
+static void discard_dg(int s, servtab_t *sep UNUSED_PARAM)
{
/* dgram builtins are non-forking - DONT BLOCK! */
recv(s, line, LINE_SIZE, MSG_DONTWAIT);
}
/* Character generator. MMU arches only. */
/* ARGSUSED */
-static void chargen_stream(int s, servtab_t *sep ATTRIBUTE_UNUSED)
+static void chargen_stream(int s, servtab_t *sep UNUSED_PARAM)
{
char *rs;
int len;
return htonl((uint32_t)(tv.tv_sec + 2208988800));
}
/* ARGSUSED */
-static void machtime_stream(int s, servtab_t *sep ATTRIBUTE_UNUSED)
+static void machtime_stream(int s, servtab_t *sep UNUSED_PARAM)
{
uint32_t result;
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME
/* Return human-readable time of day */
/* ARGSUSED */
-static void daytime_stream(int s, servtab_t *sep ATTRIBUTE_UNUSED)
+static void daytime_stream(int s, servtab_t *sep UNUSED_PARAM)
{
time_t t;
}
/* Display an UNSPEC socket address. */
-static const char* FAST_FUNC UNSPEC_sprint(struct sockaddr *sap, int numeric ATTRIBUTE_UNUSED)
+static const char* FAST_FUNC UNSPEC_sprint(struct sockaddr *sap, int numeric UNUSED_PARAM)
{
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return "[NONE SET]";
|| ENABLE_FEATURE_IP_TUNNEL \
|| ENABLE_FEATURE_IP_RULE
-static int ATTRIBUTE_NORETURN ip_print_help(char ATTRIBUTE_UNUSED **argv)
+static int NORETURN ip_print_help(char **argv UNUSED_PARAM)
{
bb_show_usage();
}
#if ENABLE_FEATURE_IP_ADDRESS
int ipaddr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int ipaddr_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int ipaddr_main(int argc UNUSED_PARAM, char **argv)
{
return ip_do(do_ipaddr, argv);
}
#endif
#if ENABLE_FEATURE_IP_LINK
int iplink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int iplink_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int iplink_main(int argc UNUSED_PARAM, char **argv)
{
return ip_do(do_iplink, argv);
}
#endif
#if ENABLE_FEATURE_IP_ROUTE
int iproute_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int iproute_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int iproute_main(int argc UNUSED_PARAM, char **argv)
{
return ip_do(do_iproute, argv);
}
#endif
#if ENABLE_FEATURE_IP_RULE
int iprule_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int iprule_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int iprule_main(int argc UNUSED_PARAM, char **argv)
{
return ip_do(do_iprule, argv);
}
#endif
#if ENABLE_FEATURE_IP_TUNNEL
int iptunnel_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int iptunnel_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int iptunnel_main(int argc UNUSED_PARAM, char **argv)
{
return ip_do(do_iptunnel, argv);
}
int ip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int ip_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int ip_main(int argc UNUSED_PARAM, char **argv)
{
static const char keywords[] ALIGN1 =
USE_FEATURE_IP_ADDRESS("address\0")
return retval;
}
-static int do_timeout(void **paramp ATTRIBUTE_UNUSED)
+static int do_timeout(void **paramp UNUSED_PARAM)
{
return 1; /* terminate session */
}
}
int fakeidentd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int fakeidentd_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int fakeidentd_main(int argc UNUSED_PARAM, char **argv)
{
enum {
OPT_foreground = 0x1,
extern int print_neigh(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg);
extern int ipaddr_list_or_flush(char **argv, int flush);
extern int iproute_monitor(char **argv);
-extern void iplink_usage(void) ATTRIBUTE_NORETURN;
+extern void iplink_usage(void) NORETURN;
extern void ipneigh_reset_filter(void);
extern int do_ipaddr(char **argv);
return 0;
}
-static int print_addrinfo(const struct sockaddr_nl *who ATTRIBUTE_UNUSED,
- struct nlmsghdr *n, void *arg ATTRIBUTE_UNUSED)
+static int print_addrinfo(const struct sockaddr_nl *who UNUSED_PARAM,
+ struct nlmsghdr *n, void *arg UNUSED_PARAM)
{
struct ifaddrmsg *ifa = NLMSG_DATA(n);
int len = n->nlmsg_len;
}
-static void die_must_be_on_off(const char *msg) ATTRIBUTE_NORETURN;
+static void die_must_be_on_off(const char *msg) NORETURN;
static void die_must_be_on_off(const char *msg)
{
bb_error_msg_and_die("argument of \"%s\" must be \"on\" or \"off\"", msg);
return hz_internal;
}
-static int print_route(const struct sockaddr_nl *who ATTRIBUTE_UNUSED,
- struct nlmsghdr *n, void *arg ATTRIBUTE_UNUSED)
+static int print_route(const struct sockaddr_nl *who UNUSED_PARAM,
+ struct nlmsghdr *n, void *arg UNUSED_PARAM)
{
struct rtmsg *r = NLMSG_DATA(n);
int len = n->nlmsg_len;
}
*/
-static int print_rule(const struct sockaddr_nl *who ATTRIBUTE_UNUSED,
- struct nlmsghdr *n, void *arg ATTRIBUTE_UNUSED)
+static int print_rule(const struct sockaddr_nl *who UNUSED_PARAM,
+ struct nlmsghdr *n, void *arg UNUSED_PARAM)
{
struct rtmsg *r = NLMSG_DATA(n);
int len = n->nlmsg_len;
return NULL;
}
-int ll_remember_index(const struct sockaddr_nl *who ATTRIBUTE_UNUSED,
+int ll_remember_index(const struct sockaddr_nl *who UNUSED_PARAM,
struct nlmsghdr *n,
- void *arg ATTRIBUTE_UNUSED)
+ void *arg UNUSED_PARAM)
{
int h;
struct ifinfomsg *ifi = NLMSG_DATA(n);
return 0;
}
-const char *rt_addr_n2a(int af, int ATTRIBUTE_UNUSED len,
+const char *rt_addr_n2a(int af, int UNUSED_PARAM len,
void *addr, char *buf, int buflen)
{
switch (af) {
#define SPRINT_BSIZE 64
#define SPRINT_BUF(x) char x[SPRINT_BSIZE]
-extern void incomplete_command(void) ATTRIBUTE_NORETURN;
+extern void incomplete_command(void) NORETURN;
#define NEXT_ARG() do { if (!*++argv) incomplete_command(); } while (0)
extern const char *format_host(int af, int len, void *addr, char *buf, int buflen);
extern const char *rt_addr_n2a(int af, int len, void *addr, char *buf, int buflen);
-void invarg(const char *, const char *) ATTRIBUTE_NORETURN;
-void duparg(const char *, const char *) ATTRIBUTE_NORETURN;
-void duparg2(const char *, const char *) ATTRIBUTE_NORETURN;
+void invarg(const char *, const char *) NORETURN;
+void duparg(const char *, const char *) NORETURN;
+void duparg2(const char *, const char *) NORETURN;
int inet_addr_match(inet_prefix *a, inet_prefix *b, int bits);
const char *dnet_ntop(int af, const void *addr, char *str, size_t len);
* when compared to "standard" nc
*/
-static void timeout(int signum ATTRIBUTE_UNUSED)
+static void timeout(int signum UNUSED_PARAM)
{
bb_error_msg_and_die("timed out");
}
}
/* timeout and other signal handling cruft */
-static void tmtravel(int sig ATTRIBUTE_UNUSED)
+static void tmtravel(int sig UNUSED_PARAM)
{
unarm();
longjmp(jbuf, 1);
that would be security-critical, which is why it's ifdefed out by default.
Use at your own hairy risk; if you leave shells lying around behind open
listening ports you deserve to lose!! */
-static int doexec(char **proggie) ATTRIBUTE_NORETURN;
+static int doexec(char **proggie) NORETURN;
static int doexec(char **proggie)
{
xmove_fd(netfd, 0);
}
int netstat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int netstat_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int netstat_main(int argc UNUSED_PARAM, char **argv)
{
const char *net_conn_line_header = PRINT_NET_CONN_HEADER;
unsigned opt;
static char *hostname;
-static void noresp(int ign ATTRIBUTE_UNUSED)
+static void noresp(int ign UNUSED_PARAM)
{
printf("No response from %s\n", hostname);
exit(EXIT_FAILURE);
#endif
int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int ping_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int ping_main(int argc UNUSED_PARAM, char **argv)
{
len_and_sockaddr *lsa;
#if ENABLE_PING6
/**************************************************************************/
-static void print_stats_and_exit(int junk) ATTRIBUTE_NORETURN;
-static void print_stats_and_exit(int junk ATTRIBUTE_UNUSED)
+static void print_stats_and_exit(int junk) NORETURN;
+static void print_stats_and_exit(int junk UNUSED_PARAM)
{
signal(SIGINT, SIG_IGN);
}
}
-static void sendping4(int junk ATTRIBUTE_UNUSED)
+static void sendping4(int junk UNUSED_PARAM)
{
/* +4 reserves a place for timestamp, which may end up sitting
* *after* packet. Saves one if() */
sendping_tail(sendping4, pkt, datalen + ICMP_MINLEN);
}
#if ENABLE_PING6
-static void sendping6(int junk ATTRIBUTE_UNUSED)
+static void sendping6(int junk UNUSED_PARAM)
{
struct icmp6_hdr *pkt = alloca(datalen + sizeof(struct icmp6_hdr) + 4);
}
int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int ping_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int ping_main(int argc UNUSED_PARAM, char **argv)
{
len_and_sockaddr *lsa;
char *opt_c, *opt_s;
#define MONOTONIC_US() ((unsigned)monotonic_us())
int pscan_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int pscan_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int pscan_main(int argc UNUSED_PARAM, char **argv)
{
const char *opt_max_port = "1024"; /* -P: default max port */
const char *opt_min_port = "1"; /* -p: default min port */
;
int route_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int route_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int route_main(int argc UNUSED_PARAM, char **argv)
{
unsigned opt;
int what;
}
int sendgetmail_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int sendgetmail_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int sendgetmail_main(int argc UNUSED_PARAM, char **argv)
{
llist_t *opt_recipients = NULL;
llist_t *opt_attachments = NULL;
* Go on after errors: we want to restore as many controlled ttys
* as possible.
*/
-static void restore_state_and_exit(int exitcode) ATTRIBUTE_NORETURN;
+static void restore_state_and_exit(int exitcode) NORETURN;
static void restore_state_and_exit(int exitcode)
{
struct termios state;
}
}
-static void sig_handler(int signo ATTRIBUTE_UNUSED)
+static void sig_handler(int signo UNUSED_PARAM)
{
restore_state_and_exit(EXIT_SUCCESS);
}
int slattach_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int slattach_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int slattach_main(int argc UNUSED_PARAM, char **argv)
{
/* Line discipline code table */
static const char proto_names[] ALIGN1 =
bb_error_msg("status %u/%u", cnum, cmax);
}
-static void sig_child_handler(int sig ATTRIBUTE_UNUSED)
+static void sig_child_handler(int sig UNUSED_PARAM)
{
int wstat;
int pid;
}
int tcpudpsvd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int tcpudpsvd_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int tcpudpsvd_main(int argc UNUSED_PARAM, char **argv)
{
char *str_C, *str_t;
char *user;
#define write_str(fd, str) write(fd, str, sizeof(str) - 1)
-static void doexit(int ev) ATTRIBUTE_NORETURN;
+static void doexit(int ev) NORETURN;
static void doexit(int ev)
{
cookmode();
#endif
-static void handle_sigchld(int sig ATTRIBUTE_UNUSED)
+static void handle_sigchld(int sig UNUSED_PARAM)
{
pid_t pid;
struct tsession *ts;
}
int telnetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int telnetd_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int telnetd_main(int argc UNUSED_PARAM, char **argv)
{
fd_set rdfdset, wrfdset;
unsigned opt;
#if ENABLE_TFTP
int tftp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int tftp_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int tftp_main(int argc UNUSED_PARAM, char **argv)
{
len_and_sockaddr *peer_lsa;
const char *local_file = NULL;
}
int tftpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int tftpd_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int tftpd_main(int argc UNUSED_PARAM, char **argv)
{
len_and_sockaddr *our_lsa;
len_and_sockaddr *peer_lsa;
unsigned char seq; /* sequence number of this packet */
unsigned char ttl; /* ttl packet left with */
// UNUSED. Retaining to have the same packet size.
- struct timeval tv_UNUSED ATTRIBUTE_PACKED; /* time packet left */
+ struct timeval tv_UNUSED PACKED; /* time packet left */
} outdata_t;
struct IFADDRLIST {
uint8_t tHaddr[6]; /* 20 target's hardware address */
uint8_t tInaddr[4]; /* 26 target's IP address */
uint8_t pad[18]; /* 2a pad for min. ethernet payload (60 bytes) */
-} ATTRIBUTE_PACKED;
+} PACKED;
enum {
ARP_MSG_SIZE = 0x2a
uint8_t file[128];
uint32_t cookie;
uint8_t options[DHCP_OPTIONS_BUFSIZE + CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS];
-} ATTRIBUTE_PACKED;
+} PACKED;
struct udp_dhcp_packet {
struct iphdr ip;
struct udphdr udp;
struct dhcpMessage data;
-} ATTRIBUTE_PACKED;
+} PACKED;
/* Let's see whether compiler understood us right */
struct BUG_bad_sizeof_struct_udp_dhcp_packet {
int udhcpc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int udhcpc_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int udhcpc_main(int argc UNUSED_PARAM, char **argv)
{
uint8_t *temp, *message;
char *str_c, *str_V, *str_h, *str_F, *str_r;
int udhcpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int udhcpd_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int udhcpd_main(int argc UNUSED_PARAM, char **argv)
{
fd_set rfds;
struct timeval tv;
}
static void dhcprelay_loop(int *fds, int num_sockets, int max_socket, char **clients,
- struct sockaddr_in *server_addr, uint32_t gw_ip) ATTRIBUTE_NORETURN;
+ struct sockaddr_in *server_addr, uint32_t gw_ip) NORETURN;
static void dhcprelay_loop(int *fds, int num_sockets, int max_socket, char **clients,
struct sockaddr_in *server_addr, uint32_t gw_ip)
{
#include "dhcpd.h"
int dumpleases_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int dumpleases_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int dumpleases_main(int argc UNUSED_PARAM, char **argv)
{
int fd;
int i;
char *line;
const struct dhcp_option *option;
int retval, length, idx;
- char buffer[8] __attribute__((aligned(4)));
+ char buffer[8] ALIGNED(4);
uint16_t *result_u16 = (uint16_t *) buffer;
uint32_t *result_u32 = (uint32_t *) buffer;
*/
#else /* FEATURE_WGET_STATUSBAR */
-static ALWAYS_INLINE void progressmeter(int flag ATTRIBUTE_UNUSED) { }
+static ALWAYS_INLINE void progressmeter(int flag UNUSED_PARAM) { }
#endif
int wget_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int wget_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int wget_main(int argc UNUSED_PARAM, char **argv)
{
char buf[512];
struct host_info server, target;
struct arp_packet {
struct ether_header eth;
struct ether_arp arp;
-} ATTRIBUTE_PACKED;
+} PACKED;
enum {
/* 169.254.0.0 */
}
int lpd_main(int argc, char *argv[]) MAIN_EXTERNALLY_VISIBLE;
-int lpd_main(int argc ATTRIBUTE_UNUSED, char *argv[])
+int lpd_main(int argc UNUSED_PARAM, char *argv[])
{
int spooling = spooling; // for compiler
char *s, *queue;
}
int lpqr_main(int argc, char *argv[]) MAIN_EXTERNALLY_VISIBLE;
-int lpqr_main(int argc ATTRIBUTE_UNUSED, char *argv[])
+int lpqr_main(int argc UNUSED_PARAM, char *argv[])
{
enum {
OPT_P = 1 << 0, // -P queue[@host[:port]]. If no -P is given use $PRINTER, then "lp@localhost:515"
}
int fuser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int fuser_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int fuser_main(int argc UNUSED_PARAM, char **argv)
{
pid_list *plist;
inode_list *ilist;
S_STAT(s_stat)
S_STAT_END(s_stat)
-static void collect_literal(s_stat *s ATTRIBUTE_UNUSED)
+static void collect_literal(s_stat *s UNUSED_PARAM)
{
}
return NULL;
}
-static s_stat* init_cr(const char *param ATTRIBUTE_UNUSED)
+static s_stat* init_cr(const char *param UNUSED_PARAM)
{
final_str = "\r";
return (s_stat*)0;
scale(data[0] - old);
}
-static s_stat* init_ctx(const char *param ATTRIBUTE_UNUSED)
+static s_stat* init_ctx(const char *param UNUSED_PARAM)
{
ctx_stat *s = xzalloc(sizeof(*s));
s->collect = collect_ctx;
scale(data[1]*512);
}
-static s_stat* init_blk(const char *param ATTRIBUTE_UNUSED)
+static s_stat* init_blk(const char *param UNUSED_PARAM)
{
blk_stat *s = xzalloc(sizeof(*s));
s->collect = collect_blk;
ullong old;
S_STAT_END(fork_stat)
-static void collect_thread_nr(fork_stat *s ATTRIBUTE_UNUSED)
+static void collect_thread_nr(fork_stat *s UNUSED_PARAM)
{
ullong data[1];
S_STAT(swp_stat)
S_STAT_END(swp_stat)
-static void collect_swp(swp_stat *s ATTRIBUTE_UNUSED)
+static void collect_swp(swp_stat *s UNUSED_PARAM)
{
ullong s_total[1];
ullong s_free[1];
scale((s_total[0]-s_free[0]) << 10);
}
-static s_stat* init_swp(const char *param ATTRIBUTE_UNUSED)
+static s_stat* init_swp(const char *param UNUSED_PARAM)
{
swp_stat *s = xzalloc(sizeof(*s));
s->collect = collect_swp;
S_STAT(fd_stat)
S_STAT_END(fd_stat)
-static void collect_fd(fd_stat *s ATTRIBUTE_UNUSED)
+static void collect_fd(fd_stat *s UNUSED_PARAM)
{
ullong data[2];
scale(data[0] - data[1]);
}
-static s_stat* init_fd(const char *param ATTRIBUTE_UNUSED)
+static s_stat* init_fd(const char *param UNUSED_PARAM)
{
fd_stat *s = xzalloc(sizeof(*s));
s->collect = collect_fd;
}
int pgrep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int pgrep_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int pgrep_main(int argc UNUSED_PARAM, char **argv)
{
unsigned pid = getpid();
int signo = SIGTERM;
};
int pidof_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int pidof_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int pidof_main(int argc UNUSED_PARAM, char **argv)
{
unsigned first = 1;
unsigned opt;
}
int ps_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int ps_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int ps_main(int argc UNUSED_PARAM, char **argv)
{
procps_status_t *p;
llist_t* opt_o = NULL;
int ps_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int ps_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+int ps_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
procps_status_t *p = NULL;
int len;
void BUG_bad_PRIO_USER(void);
int renice_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int renice_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int renice_main(int argc UNUSED_PARAM, char **argv)
{
static const char Xetpriority_msg[] ALIGN1 = "%cetpriority";
};
int sysctl_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int sysctl_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int sysctl_main(int argc UNUSED_PARAM, char **argv)
{
int retval;
int opt;
}
}
-static void sig_catcher(int sig ATTRIBUTE_UNUSED)
+static void sig_catcher(int sig UNUSED_PARAM)
{
reset_term();
exit(EXIT_FAILURE);
};
int top_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int top_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int top_main(int argc UNUSED_PARAM, char **argv)
{
int count;
int iterations;
int uptime_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int uptime_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+int uptime_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
int updays, uphours, upminutes;
struct sysinfo info;
// (procps 3.x and procps 2.x are forks, not newer/older versions of the same)
int watch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int watch_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int watch_main(int argc UNUSED_PARAM, char **argv)
{
unsigned opt;
unsigned period = 2;
}
/* argv[0] */
-static void setuidgid(int, char **) ATTRIBUTE_NORETURN;
-static void envuidgid(int, char **) ATTRIBUTE_NORETURN;
-static void envdir(int, char **) ATTRIBUTE_NORETURN;
-static void softlimit(int, char **) ATTRIBUTE_NORETURN;
+static void setuidgid(int, char **) NORETURN;
+static void envuidgid(int, char **) NORETURN;
+static void envdir(int, char **) NORETURN;
+static void softlimit(int, char **) NORETURN;
int chpst_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int chpst_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int chpst_main(int argc UNUSED_PARAM, char **argv)
{
INIT_G();
bb_perror_msg_and_die("exec %s", argv[0]);
}
-static void setuidgid(int argc ATTRIBUTE_UNUSED, char **argv)
+static void setuidgid(int argc UNUSED_PARAM, char **argv)
{
const char *account;
bb_perror_msg_and_die("exec %s", argv[0]);
}
-static void envuidgid(int argc ATTRIBUTE_UNUSED, char **argv)
+static void envuidgid(int argc UNUSED_PARAM, char **argv)
{
const char *account;
bb_perror_msg_and_die("exec %s", argv[0]);
}
-static void envdir(int argc ATTRIBUTE_UNUSED, char **argv)
+static void envdir(int argc UNUSED_PARAM, char **argv)
{
const char *dir;
bb_perror_msg_and_die("exec %s", argv[0]);
}
-static void softlimit(int argc ATTRIBUTE_UNUSED, char **argv)
+static void softlimit(int argc UNUSED_PARAM, char **argv)
{
char *a,*c,*d,*f,*l,*m,*o,*p,*r,*s,*t;
getopt32(argv, "+a:c:d:f:l:m:o:p:r:s:t:",
* runsv / supervise / sv stuff
*/
typedef struct svstatus_t {
- uint64_t time_be64 ATTRIBUTE_PACKED;
- uint32_t time_nsec_be32 ATTRIBUTE_PACKED;
- uint32_t pid_le32 ATTRIBUTE_PACKED;
+ uint64_t time_be64 PACKED;
+ uint32_t time_nsec_be32 PACKED;
+ uint32_t pid_le32 PACKED;
uint8_t paused;
uint8_t want;
uint8_t got_term;
bb_perror_msg("%s: warning: cannot %s", dir, m);
}
-static void s_child(int sig_no ATTRIBUTE_UNUSED)
+static void s_child(int sig_no UNUSED_PARAM)
{
write(selfpipe.wr, "", 1);
}
-static void s_term(int sig_no ATTRIBUTE_UNUSED)
+static void s_term(int sig_no UNUSED_PARAM)
{
sigterm = 1;
write(selfpipe.wr, "", 1); /* XXX */
}
int runsv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int runsv_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int runsv_main(int argc UNUSED_PARAM, char **argv)
{
struct stat s;
int fd;
warn3x(m1, "", "");
}
-static void s_term(int sig_no ATTRIBUTE_UNUSED)
+static void s_term(int sig_no UNUSED_PARAM)
{
exitsoon = 1;
}
-static void s_hangup(int sig_no ATTRIBUTE_UNUSED)
+static void s_hangup(int sig_no UNUSED_PARAM)
{
exitsoon = 2;
}
}
int runsvdir_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int runsvdir_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int runsvdir_main(int argc UNUSED_PARAM, char **argv)
{
struct stat s;
dev_t last_dev = last_dev; /* for gcc */
#define INIT_G() do { } while (0)
-static void fatal_cannot(const char *m1) ATTRIBUTE_NORETURN;
+static void fatal_cannot(const char *m1) NORETURN;
static void fatal_cannot(const char *m1)
{
bb_perror_msg("fatal: cannot %s", m1);
return pid ? 1 : 2;
}
-static int status(const char *unused ATTRIBUTE_UNUSED)
+static int status(const char *unused UNUSED_PARAM)
{
int r;
return i;
}
-static void sig_term_handler(int sig_no ATTRIBUTE_UNUSED)
+static void sig_term_handler(int sig_no UNUSED_PARAM)
{
if (verbose)
bb_error_msg(INFO"sig%s received", "term");
exitasap = 1;
}
-static void sig_child_handler(int sig_no ATTRIBUTE_UNUSED)
+static void sig_child_handler(int sig_no UNUSED_PARAM)
{
int pid, l;
}
}
-static void sig_alarm_handler(int sig_no ATTRIBUTE_UNUSED)
+static void sig_alarm_handler(int sig_no UNUSED_PARAM)
{
if (verbose)
bb_error_msg(INFO"sig%s received", "alarm");
rotateasap = 1;
}
-static void sig_hangup_handler(int sig_no ATTRIBUTE_UNUSED)
+static void sig_hangup_handler(int sig_no UNUSED_PARAM)
{
if (verbose)
bb_error_msg(INFO"sig%s received", "hangup");
static int FAST_FUNC change_filedir_context(
const char *fname,
- struct stat *stbuf ATTRIBUTE_UNUSED,
- void *userData ATTRIBUTE_UNUSED,
- int depth ATTRIBUTE_UNUSED)
+ struct stat *stbuf UNUSED_PARAM,
+ void *userData UNUSED_PARAM,
+ int depth UNUSED_PARAM)
{
context_t context = NULL;
security_context_t file_context = NULL;
#endif
int chcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int chcon_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int chcon_main(int argc UNUSED_PARAM, char **argv)
{
char *reference_file;
char *fname;
#include "libbb.h"
int getenforce_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int getenforce_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+int getenforce_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
int rc;
#include "libbb.h"
int load_policy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int load_policy_main(int argc, char **argv ATTRIBUTE_UNUSED)
+int load_policy_main(int argc, char **argv UNUSED_PARAM)
{
int rc;
#define OPT_VERIFY (1<<4) /* -V */
int matchpathcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int matchpathcon_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int matchpathcon_main(int argc UNUSED_PARAM, char **argv)
{
int error = 0;
unsigned opts;
#define OPTS_CONTEXT_COMPONENT (OPTS_ROLE | OPTS_TYPE | OPTS_USER | OPTS_RANGE)
int runcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int runcon_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int runcon_main(int argc UNUSED_PARAM, char **argv)
{
char *role = NULL;
char *range = NULL;
#include "libbb.h"
int selinuxenabled_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int selinuxenabled_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+int selinuxenabled_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
return !is_selinux_enabled();
}
}
int sestatus_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int sestatus_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int sestatus_main(int argc UNUSED_PARAM, char **argv)
{
unsigned opts;
const char *pol_path;
#define FLAG_R (option_mask32 & OPT_R)
-static void qprintf(const char *fmt ATTRIBUTE_UNUSED, ...)
+static void qprintf(const char *fmt UNUSED_PARAM, ...)
{
/* quiet, do nothing */
}
static int FAST_FUNC apply_spec(
const char *file,
struct stat *sb,
- void *userData ATTRIBUTE_UNUSED,
- int depth ATTRIBUTE_UNUSED)
+ void *userData UNUSED_PARAM,
+ int depth UNUSED_PARAM)
{
if (!follow_mounts) {
/* setfiles does not process across different mount points */
* just do a longjmp to the exception handler. The type of exception is
* stored in the global variable "exception".
*/
-static void raise_exception(int) ATTRIBUTE_NORETURN;
+static void raise_exception(int) NORETURN;
static void
raise_exception(int e)
{
* are held using the INT_OFF macro. (The test for iflag is just
* defensive programming.)
*/
-static void raise_interrupt(void) ATTRIBUTE_NORETURN;
+static void raise_interrupt(void) NORETURN;
static void
raise_interrupt(void)
{
* is not NULL then error prints an error message using printf style
* formatting. It then raises the error exception.
*/
-static void ash_vmsg_and_raise(int, const char *, va_list) ATTRIBUTE_NORETURN;
+static void ash_vmsg_and_raise(int, const char *, va_list) NORETURN;
static void
ash_vmsg_and_raise(int cond, const char *msg, va_list ap)
{
/* NOTREACHED */
}
-static void ash_msg_and_raise_error(const char *, ...) ATTRIBUTE_NORETURN;
+static void ash_msg_and_raise_error(const char *, ...) NORETURN;
static void
ash_msg_and_raise_error(const char *msg, ...)
{
va_end(ap);
}
-static void ash_msg_and_raise(int, const char *, ...) ATTRIBUTE_NORETURN;
+static void ash_msg_and_raise(int, const char *, ...) NORETURN;
static void
ash_msg_and_raise(int cond, const char *msg, ...)
{
}
static int
-cdcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
const char *dest;
const char *path;
}
static int
-pwdcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+pwdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
int flags;
const char *dir = curdir;
* TODO - sort output
*/
static int
-aliascmd(int argc ATTRIBUTE_UNUSED, char **argv)
+aliascmd(int argc UNUSED_PARAM, char **argv)
{
char *n, *v;
int ret = 0;
}
static int
-unaliascmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+unaliascmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
int i;
}
static int
-fg_bgcmd(int argc ATTRIBUTE_UNUSED, char **argv)
+fg_bgcmd(int argc UNUSED_PARAM, char **argv)
{
struct job *jp;
FILE *out;
}
static int
-jobscmd(int argc ATTRIBUTE_UNUSED, char **argv)
+jobscmd(int argc UNUSED_PARAM, char **argv)
{
int mode, m;
}
static int
-waitcmd(int argc ATTRIBUTE_UNUSED, char **argv)
+waitcmd(int argc UNUSED_PARAM, char **argv)
{
struct job *job;
int retval;
}
static char *
-scanleft(char *startp, char *rmesc, char *rmescend ATTRIBUTE_UNUSED, char *str, int quotes,
+scanleft(char *startp, char *rmesc, char *rmescend UNUSED_PARAM, char *str, int quotes,
int zero)
{
// This commented out code was added by James Simmons <jsimmons@infradead.org>
return 0;
}
-static void varunset(const char *, const char *, const char *, int) ATTRIBUTE_NORETURN;
+static void varunset(const char *, const char *, const char *, int) NORETURN;
static void
varunset(const char *end, const char *var, const char *umsg, int varflags)
{
* Exec a program. Never returns. If you change this routine, you may
* have to change the find_command routine as well.
*/
-static void shellexec(char **, const char *, int) ATTRIBUTE_NORETURN;
+static void shellexec(char **, const char *, int) NORETURN;
static void
shellexec(char **argv, const char *path, int idx)
{
}
static int
-hashcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+hashcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
struct tblentry **pp;
struct tblentry *cmdp;
}
static int
-typecmd(int argc ATTRIBUTE_UNUSED, char **argv)
+typecmd(int argc UNUSED_PARAM, char **argv)
{
int i = 1;
int err = 0;
#if ENABLE_ASH_CMDCMD
static int
-commandcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+commandcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
int c;
enum {
* The "local" command.
*/
static int
-localcmd(int argc ATTRIBUTE_UNUSED, char **argv)
+localcmd(int argc UNUSED_PARAM, char **argv)
{
char *name;
}
static int
-falsecmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+falsecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
return 1;
}
static int
-truecmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+truecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
return 0;
}
static int
-execcmd(int argc ATTRIBUTE_UNUSED, char **argv)
+execcmd(int argc UNUSED_PARAM, char **argv)
{
if (argv[1]) {
iflag = 0; /* exit on error */
* The return command.
*/
static int
-returncmd(int argc ATTRIBUTE_UNUSED, char **argv)
+returncmd(int argc UNUSED_PARAM, char **argv)
{
/*
* If called outside a function, do what ksh does;
return *q == '=';
}
static int
-bltincmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+bltincmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
/* Preserve exitstatus of a previous possible redirection
* as POSIX mandates */
* in the standard shell so we don't make it one here.
*/
static int
-breakcmd(int argc ATTRIBUTE_UNUSED, char **argv)
+breakcmd(int argc UNUSED_PARAM, char **argv)
{
int n = argv[1] ? number(argv[1]) : 1;
}
static void
-changemail(const char *val ATTRIBUTE_UNUSED)
+changemail(const char *val UNUSED_PARAM)
{
mail_var_path_changed = 1;
}
* The shift builtin command.
*/
static int
-shiftcmd(int argc ATTRIBUTE_UNUSED, char **argv)
+shiftcmd(int argc UNUSED_PARAM, char **argv)
{
int n;
char **ap1, **ap2;
* The set command builtin.
*/
static int
-setcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+setcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
int retval;
*/
#define NEOF ((union node *)&tokpushback)
-static void raise_error_syntax(const char *) ATTRIBUTE_NORETURN;
+static void raise_error_syntax(const char *) NORETURN;
static void
raise_error_syntax(const char *msg)
{
* is the token that is expected, or -1 if more than one type of token can
* occur at this point.
*/
-static void raise_error_unexpected_syntax(int) ATTRIBUTE_NORETURN;
+static void raise_error_unexpected_syntax(int) NORETURN;
static void
raise_error_unexpected_syntax(int token)
{
* The eval command.
*/
static int
-evalcmd(int argc ATTRIBUTE_UNUSED, char **argv)
+evalcmd(int argc UNUSED_PARAM, char **argv)
{
char *p;
char *concat;
}
static int
-exitcmd(int argc ATTRIBUTE_UNUSED, char **argv)
+exitcmd(int argc UNUSED_PARAM, char **argv)
{
if (stoppedjobs())
return 0;
* The trap builtin.
*/
static int
-trapcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
char *action;
char **ap;
* Lists available builtins
*/
static int
-helpcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
unsigned col;
unsigned i;
* The export and readonly commands.
*/
static int
-exportcmd(int argc ATTRIBUTE_UNUSED, char **argv)
+exportcmd(int argc UNUSED_PARAM, char **argv)
{
struct var *vp;
char *name;
* with the same name.
*/
static int
-unsetcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+unsetcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
char **ap;
int i;
};
static int
-timescmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+timescmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
long clk_tck, s, t;
const unsigned char *p;
* Copyright (C) 2003 Vladimir Oleynik <dzo@simtreas.ru>
*/
static int
-letcmd(int argc ATTRIBUTE_UNUSED, char **argv)
+letcmd(int argc UNUSED_PARAM, char **argv)
{
arith_t i;
* -e Use line editing (tty only)
*/
static int
-readcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
static const char *const arg_REPLY[] = { "REPLY", NULL };
}
static int
-umaskcmd(int argc ATTRIBUTE_UNUSED, char **argv)
+umaskcmd(int argc UNUSED_PARAM, char **argv)
{
static const char permuser[3] ALIGN1 = "ugo";
static const char permmode[3] ALIGN1 = "rwx";
}
static int
-ulimitcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+ulimitcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
int c;
rlim_t val = 0;
/*
* Called to exit the shell.
*/
-static void exitshell(void) ATTRIBUTE_NORETURN;
+static void exitshell(void) NORETURN;
static void
exitshell(void)
{
* is used to figure out how far we had gotten.
*/
int ash_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int ash_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int ash_main(int argc UNUSED_PARAM, char **argv)
{
char *shinit;
volatile int state;
};
int cttyhack_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int cttyhack_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int cttyhack_main(int argc UNUSED_PARAM, char **argv)
{
int fd;
char console[sizeof(int)*3 + 16];
#define pseudo_exec_argv(ptrs2free, argv) pseudo_exec_argv(argv)
#define pseudo_exec(ptrs2free, child) pseudo_exec(child)
#endif
-static void pseudo_exec_argv(char **ptrs2free, char **argv) ATTRIBUTE_NORETURN;
-static void pseudo_exec(char **ptrs2free, struct child_prog *child) ATTRIBUTE_NORETURN;
+static void pseudo_exec_argv(char **ptrs2free, char **argv) NORETURN;
+static void pseudo_exec(char **ptrs2free, struct child_prog *child) NORETURN;
static int run_pipe(struct pipe *pi);
/* data structure manipulation: */
static int setup_redirect(struct p_context *ctx, int fd, redir_type style, struct in_str *input);
signal(SIGCHLD, handler);
}
-static void handler_ctrl_c(int sig ATTRIBUTE_UNUSED)
+static void handler_ctrl_c(int sig UNUSED_PARAM)
{
debug_printf_jobs("got sig %d\n", sig);
// as usual we can have all kinds of nasty problems with leaked malloc data here
siglongjmp(toplevel_jb, 1);
}
-static void handler_ctrl_z(int sig ATTRIBUTE_UNUSED)
+static void handler_ctrl_z(int sig UNUSED_PARAM)
{
pid_t pid;
* (will faithfully resend signal to itself, producing correct exit state)
* or called directly with -EXITCODE.
* We also call it if xfunc is exiting. */
-static void sigexit(int sig) ATTRIBUTE_NORETURN;
+static void sigexit(int sig) NORETURN;
static void sigexit(int sig)
{
/* Disable all signals: job control, SIGPIPE, etc. */
}
/* Restores tty foreground process group, and exits. */
-static void hush_exit(int exitcode) ATTRIBUTE_NORETURN;
+static void hush_exit(int exitcode) NORETURN;
static void hush_exit(int exitcode)
{
fflush(NULL); /* flush all streams */
/*
* Built-ins
*/
-static int builtin_true(char **argv ATTRIBUTE_UNUSED)
+static int builtin_true(char **argv UNUSED_PARAM)
{
return 0;
}
#endif
#if ENABLE_HUSH_HELP
-static int builtin_help(char **argv ATTRIBUTE_UNUSED)
+static int builtin_help(char **argv UNUSED_PARAM)
{
const struct built_in_command *x;
#endif
#if ENABLE_HUSH_JOB
-static int builtin_jobs(char **argv ATTRIBUTE_UNUSED)
+static int builtin_jobs(char **argv UNUSED_PARAM)
{
struct pipe *job;
const char *status_string;
}
#endif
-static int builtin_pwd(char **argv ATTRIBUTE_UNUSED)
+static int builtin_pwd(char **argv UNUSED_PARAM)
{
puts(set_cwd());
return EXIT_SUCCESS;
static int get_command_bufsiz(FILE *source, char *command);
static int parse_command(char **command_ptr, struct job *job, int *inbg);
static int run_command(struct job *newjob, int inbg, int outpipe[2]);
-static int pseudo_exec(struct child_prog *cmd) ATTRIBUTE_NORETURN;
+static int pseudo_exec(struct child_prog *cmd) NORETURN;
static int busy_loop(FILE *input);
va_end(args);
}
#else
-static inline void debug_printf(const char ATTRIBUTE_UNUSED *format, ...) { }
+static inline void debug_printf(const char UNUSED_PARAM *format, ...) { }
#endif
/*
}
/* built-in 'help' handler */
-static int builtin_help(struct child_prog ATTRIBUTE_UNUSED *dummy)
+static int builtin_help(struct child_prog UNUSED_PARAM *dummy)
{
const struct built_in_command *x;
/* built-in 'pwd' handler */
-static int builtin_pwd(struct child_prog ATTRIBUTE_UNUSED *dummy)
+static int builtin_pwd(struct child_prog UNUSED_PARAM *dummy)
{
update_cwd();
puts(cwd);
# define nonblock_safe_read(fd,buf,count) read(fd,buf,count)
# define NOT_LONE_DASH(s) ((s)[0] != '-' || (s)[1])
# define LONE_CHAR(s,c) ((s)[0] == (c) && !(s)[1])
-# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+# define NORETURN __attribute__ ((__noreturn__))
static int find_applet_by_name(const char *applet)
{
return -1;
/* fail but return to process next command */
-static void fail(void) ATTRIBUTE_NORETURN;
+static void fail(void) NORETURN;
static void fail(void)
{
longjmp(failpt, 1);
}
/* abort shell (or fail in subshell) */
-static void leave(void) ATTRIBUTE_NORETURN;
+static void leave(void) NORETURN;
static void leave(void)
{
DBGPRINTF(("LEAVE: leave called!\n"));
PUSHIO(afile, f, filechar);
}
-static void onintr(int s ATTRIBUTE_UNUSED) /* ANSI C requires a parameter */
+static void onintr(int s UNUSED_PARAM) /* ANSI C requires a parameter */
{
signal(SIGINT, onintr);
intr = 1;
* shell: syntax (C version)
*/
-static void yyerror(const char *s) ATTRIBUTE_NORETURN;
+static void yyerror(const char *s) NORETURN;
static void yyerror(const char *s)
{
yynerrs = 1;
fail();
}
-static void zzerr(void) ATTRIBUTE_NORETURN;
+static void zzerr(void) NORETURN;
static void zzerr(void)
{
yyerror("syntax error");
* built-in commands: doX
*/
-static int dohelp(struct op *t ATTRIBUTE_UNUSED, char **args ATTRIBUTE_UNUSED)
+static int dohelp(struct op *t UNUSED_PARAM, char **args UNUSED_PARAM)
{
int col;
const struct builtincmd *x;
return EXIT_SUCCESS;
}
-static int dolabel(struct op *t ATTRIBUTE_UNUSED, char **args ATTRIBUTE_UNUSED)
+static int dolabel(struct op *t UNUSED_PARAM, char **args UNUSED_PARAM)
{
return 0;
}
-static int dochdir(struct op *t ATTRIBUTE_UNUSED, char **args)
+static int dochdir(struct op *t UNUSED_PARAM, char **args)
{
const char *cp, *er;
return 1;
}
-static int doshift(struct op *t ATTRIBUTE_UNUSED, char **args)
+static int doshift(struct op *t UNUSED_PARAM, char **args)
{
int n;
/*
* execute login and newgrp directly
*/
-static int dologin(struct op *t ATTRIBUTE_UNUSED, char **args)
+static int dologin(struct op *t UNUSED_PARAM, char **args)
{
const char *cp;
return 1;
}
-static int doumask(struct op *t ATTRIBUTE_UNUSED, char **args)
+static int doumask(struct op *t UNUSED_PARAM, char **args)
{
int i;
char *cp;
return 1;
}
-static int dodot(struct op *t ATTRIBUTE_UNUSED, char **args)
+static int dodot(struct op *t UNUSED_PARAM, char **args)
{
int i;
const char *sp;
return -1;
}
-static int dowait(struct op *t ATTRIBUTE_UNUSED, char **args)
+static int dowait(struct op *t UNUSED_PARAM, char **args)
{
int i;
char *cp;
return 0;
}
-static int doread(struct op *t ATTRIBUTE_UNUSED, char **args)
+static int doread(struct op *t UNUSED_PARAM, char **args)
{
char *cp, **wp;
int nb = 0;
return nb <= 0;
}
-static int doeval(struct op *t ATTRIBUTE_UNUSED, char **args)
+static int doeval(struct op *t UNUSED_PARAM, char **args)
{
return RUN(awordlist, args + 1, wdchar);
}
-static int dotrap(struct op *t ATTRIBUTE_UNUSED, char **args)
+static int dotrap(struct op *t UNUSED_PARAM, char **args)
{
int n, i;
int resetsig;
return n * m;
}
-static int dobreak(struct op *t ATTRIBUTE_UNUSED, char **args)
+static int dobreak(struct op *t UNUSED_PARAM, char **args)
{
return brkcontin(args[1], 1);
}
-static int docontinue(struct op *t ATTRIBUTE_UNUSED, char **args)
+static int docontinue(struct op *t UNUSED_PARAM, char **args)
{
return brkcontin(args[1], 0);
}
/* NOTREACHED */
}
-static int doexit(struct op *t ATTRIBUTE_UNUSED, char **args)
+static int doexit(struct op *t UNUSED_PARAM, char **args)
{
char *cp;
return 0;
}
-static int doexport(struct op *t ATTRIBUTE_UNUSED, char **args)
+static int doexport(struct op *t UNUSED_PARAM, char **args)
{
rdexp(args + 1, export, EXPORT);
return 0;
}
-static int doreadonly(struct op *t ATTRIBUTE_UNUSED, char **args)
+static int doreadonly(struct op *t UNUSED_PARAM, char **args)
{
rdexp(args + 1, ronly, RONLY);
return 0;
err(": bad identifier");
}
-static int doset(struct op *t ATTRIBUTE_UNUSED, char **args)
+static int doset(struct op *t UNUSED_PARAM, char **args)
{
struct var *vp;
char *cp;
#endif
}
-static int dotimes(struct op *t ATTRIBUTE_UNUSED, char **args ATTRIBUTE_UNUSED)
+static int dotimes(struct op *t UNUSED_PARAM, char **args UNUSED_PARAM)
{
struct tms buf;
unsigned clk_tck = sysconf(_SC_CLK_TCK);
};
int klogd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int klogd_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int klogd_main(int argc UNUSED_PARAM, char **argv)
{
int i = 0;
char *start;
memcpy(SMrup, init_sem, sizeof(init_sem)); \
} while (0)
-static void error_exit(const char *str) ATTRIBUTE_NORETURN;
+static void error_exit(const char *str) NORETURN;
static void error_exit(const char *str)
{
//release all acquired resources
error_exit("semop[SMrup]");
}
-static void interrupted(int sig ATTRIBUTE_UNUSED)
+static void interrupted(int sig UNUSED_PARAM)
{
signal(SIGINT, SIG_IGN);
shmdt(shbuf);
}
int logread_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int logread_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int logread_main(int argc UNUSED_PARAM, char **argv)
{
unsigned cur;
int log_semid; /* ipc semaphore id */
}
#endif
-static void do_syslogd(void) ATTRIBUTE_NORETURN;
+static void do_syslogd(void) NORETURN;
static void do_syslogd(void)
{
int sock_fd;
}
int syslogd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int syslogd_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int syslogd_main(int argc UNUSED_PARAM, char **argv)
{
char OPTION_DECL;
#include "libbb.h"
int dmesg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int dmesg_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int dmesg_main(int argc UNUSED_PARAM, char **argv)
{
int len;
char *buf;
#define FD_FILL_BYTE 0xF6 /* format fill byte. */
int fdformat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int fdformat_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int fdformat_main(int argc UNUSED_PARAM, char **argv)
{
int fd, n, cyl, read_bytes, verify;
unsigned char *data;
unsigned char end_cyl; /* end cylinder */
unsigned char start4[4]; /* starting sector counting from 0 */
unsigned char size4[4]; /* nr of sectors in partition */
-} ATTRIBUTE_PACKED;
+} PACKED;
static const char unable_to_open[] ALIGN1 = "cannot open %s";
static const char unable_to_read[] ALIGN1 = "cannot read from %s";
static const char unable_to_seek[] ALIGN1 = "cannot seek on %s";
-static void fdisk_fatal(const char *why) ATTRIBUTE_NORETURN;
+static void fdisk_fatal(const char *why) NORETURN;
enum label_type {
LABEL_DOS, LABEL_SUN, LABEL_SGI, LABEL_AIX, LABEL_OSF
static void recursive_check2(unsigned ino);
#endif
-static void die(const char *str) ATTRIBUTE_NORETURN;
+static void die(const char *str) NORETURN;
static void die(const char *str)
{
if (termios_set)
#endif
int fsck_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int fsck_minix_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int fsck_minix_main(int argc UNUSED_PARAM, char **argv)
{
struct termios tmp;
int retcode = 0;
#define HWCLOCK_OPT_RTCFILE 0x20
int hwclock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int hwclock_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int hwclock_main(int argc UNUSED_PARAM, char **argv)
{
unsigned opt;
int utc;
}
int ipcs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int ipcs_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int ipcs_main(int argc UNUSED_PARAM, char **argv)
{
int id = 0;
unsigned flags = 0;
/* File callback for /sys/ traversal */
static int FAST_FUNC fileAction(const char *fileName,
- struct stat *statbuf ATTRIBUTE_UNUSED,
+ struct stat *statbuf UNUSED_PARAM,
void *userData,
- int depth ATTRIBUTE_UNUSED)
+ int depth UNUSED_PARAM)
{
size_t len = strlen(fileName) - 4; /* can't underflow */
char *scratch = userData;
}
/* Directory callback for /sys/ traversal */
-static int FAST_FUNC dirAction(const char *fileName ATTRIBUTE_UNUSED,
- struct stat *statbuf ATTRIBUTE_UNUSED,
- void *userData ATTRIBUTE_UNUSED,
+static int FAST_FUNC dirAction(const char *fileName UNUSED_PARAM,
+ struct stat *statbuf UNUSED_PARAM,
+ void *userData UNUSED_PARAM,
int depth)
{
return (depth >= MAX_SYSFS_DEPTH ? SKIP : TRUE);
return try;
}
-static void alarm_intr(int alnum ATTRIBUTE_UNUSED)
+static void alarm_intr(int alnum UNUSED_PARAM)
{
if (G.currently_testing >= SB_ZONES)
return;
}
int mkfs_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int mkfs_minix_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int mkfs_minix_main(int argc UNUSED_PARAM, char **argv)
{
struct mntent *mp;
unsigned opt;
#define setTermSettings(fd, argp) tcsetattr(fd, TCSANOW, argp)
#define getTermSettings(fd, argp) tcgetattr(fd, argp)
-static void gotsig(int sig ATTRIBUTE_UNUSED)
+static void gotsig(int sig UNUSED_PARAM)
{
bb_putchar('\n');
setTermSettings(cin_fileno, &initial_settings);
#define CONVERTED_TAB_SIZE 8
int more_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int more_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int more_main(int argc UNUSED_PARAM, char **argv)
{
int c = c; /* for gcc */
int lines;
/* 16.12.2006, Sampo Kellomaki (sampo@iki.fi)
* dietlibc-0.30 does not have implementation of getmntent_r() */
static struct mntent *getmntent_r(FILE* stream, struct mntent* result,
- char* buffer ATTRIBUTE_UNUSED, int bufsize ATTRIBUTE_UNUSED)
+ char* buffer UNUSED_PARAM, int bufsize UNUSED_PARAM)
{
struct mntent* ment = getmntent(stream);
return memcpy(result, ment, sizeof(*ment));
#endif
// TODO
-static inline int we_saw_this_host_before(const char *hostname ATTRIBUTE_UNUSED)
+static inline int we_saw_this_host_before(const char *hostname UNUSED_PARAM)
{
return 0;
}
static const char must_be_root[] ALIGN1 = "you must be root";
int mount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int mount_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int mount_main(int argc UNUSED_PARAM, char **argv)
{
char *cmdopts = xstrdup("");
char *fstype = NULL;
enum { RFC_868_BIAS = 2208988800UL };
-static void socket_timeout(int sig ATTRIBUTE_UNUSED)
+static void socket_timeout(int sig UNUSED_PARAM)
{
bb_error_msg_and_die("timeout connecting to time server");
}
}
int rdate_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int rdate_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int rdate_main(int argc UNUSED_PARAM, char **argv)
{
time_t remote_time;
unsigned long flags;
static const char defaultpro[] ALIGN1 = "/proc/profile";
int readprofile_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int readprofile_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int readprofile_main(int argc UNUSED_PARAM, char **argv)
{
FILE *map;
const char *mapFile, *proFile;
#define RTCWAKE_OPT_TIME 0x40
int rtcwake_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int rtcwake_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int rtcwake_main(int argc UNUSED_PARAM, char **argv)
{
unsigned opt;
const char *rtcname = NULL;
static smallint fd_count = 2;
-static void handle_sigchld(int sig ATTRIBUTE_UNUSED)
+static void handle_sigchld(int sig UNUSED_PARAM)
{
fd_count = 0;
}
int script_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int script_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int script_main(int argc UNUSED_PARAM, char **argv)
{
int opt;
int mode;
#include "libbb.h"
int setarch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int setarch_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int setarch_main(int argc UNUSED_PARAM, char **argv)
{
int pers = -1;
}
int swap_on_off_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int swap_on_off_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int swap_on_off_main(int argc UNUSED_PARAM, char **argv)
{
int ret;
}
int switch_root_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int switch_root_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int switch_root_main(int argc UNUSED_PARAM, char **argv)
{
char *newroot, *console = NULL;
struct stat st1, st2;
/* 16.12.2006, Sampo Kellomaki (sampo@iki.fi)
* dietlibc-0.30 does not have implementation of getmntent_r() */
static struct mntent *getmntent_r(FILE* stream, struct mntent* result,
- char* buffer ATTRIBUTE_UNUSED, int bufsize ATTRIBUTE_UNUSED)
+ char* buffer UNUSED_PARAM, int bufsize UNUSED_PARAM)
{
struct mntent* ment = getmntent(stream);
return memcpy(result, ment, sizeof(*ment));
//#define MNT_DETACH 0x00000002 /* Just detach from the tree */
int umount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int umount_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int umount_main(int argc UNUSED_PARAM, char **argv)
{
int doForce;
char *const path = xmalloc(PATH_MAX + 2); /* to save stack */