Skip to content

Commit

Permalink
*: rename ATTRIBUTE_XXX to just XXX.
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Vlasenko committed Jul 5, 2008
1 parent f6efccc commit a60f84e
Show file tree
Hide file tree
Showing 228 changed files with 479 additions and 479 deletions.
2 changes: 1 addition & 1 deletion applets/applets.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "busybox.h"

#if ENABLE_BUILD_LIBBUSYBOX
int main(int argc ATTRIBUTE_UNUSED, char **argv)
int main(int argc UNUSED_PARAM, char **argv)
{
return lbb_main(argv);
}
Expand Down
8 changes: 4 additions & 4 deletions archival/bbunzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ USE_DESKTOP(long long) int unpack_bunzip2(void)
}

int bunzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int bunzip2_main(int argc ATTRIBUTE_UNUSED, char **argv)
int bunzip2_main(int argc UNUSED_PARAM, char **argv)
{
getopt32(argv, "cfvdt");
argv += optind;
Expand Down Expand Up @@ -277,7 +277,7 @@ USE_DESKTOP(long long) int unpack_gunzip(void)
*/

int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int gunzip_main(int argc ATTRIBUTE_UNUSED, char **argv)
int gunzip_main(int argc UNUSED_PARAM, char **argv)
{
getopt32(argv, "cfvdtn");
argv += optind;
Expand Down Expand Up @@ -315,7 +315,7 @@ USE_DESKTOP(long long) int unpack_unlzma(void)
}

int unlzma_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int unlzma_main(int argc ATTRIBUTE_UNUSED, char **argv)
int unlzma_main(int argc UNUSED_PARAM, char **argv)
{
getopt32(argv, "cf");
argv += optind;
Expand Down Expand Up @@ -357,7 +357,7 @@ USE_DESKTOP(long long) int unpack_uncompress(void)
}

int uncompress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int uncompress_main(int argc ATTRIBUTE_UNUSED, char **argv)
int uncompress_main(int argc UNUSED_PARAM, char **argv)
{
getopt32(argv, "cf");
argv += optind;
Expand Down
4 changes: 2 additions & 2 deletions archival/bz/bzlib_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ typedef unsigned char Bool;
#define False ((Bool)0)

#if BZ_LIGHT_DEBUG
static void bz_assert_fail(int errcode) ATTRIBUTE_NORETURN;
static void bz_assert_fail(int errcode) NORETURN;
#define AssertH(cond, errcode) \
do { \
if (!(cond)) \
Expand Down Expand Up @@ -170,7 +170,7 @@ typedef struct EState {

/* map of bytes used in block */
int32_t nInUse;
Bool inUse[256] __attribute__(( aligned(sizeof(long)) ));
Bool inUse[256] ALIGNED(sizeof(long));
uint8_t unseqToSeq[256];

/* stuff for coding the MTF values */
Expand Down
2 changes: 1 addition & 1 deletion archival/bzip2.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ char* make_new_name_bzip2(char *filename)
}

int bzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int bzip2_main(int argc ATTRIBUTE_UNUSED, char **argv)
int bzip2_main(int argc UNUSED_PARAM, char **argv)
{
unsigned opt;

Expand Down
2 changes: 1 addition & 1 deletion archival/cpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static int cpio_o(void)
#endif

int cpio_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cpio_main(int argc ATTRIBUTE_UNUSED, char **argv)
int cpio_main(int argc UNUSED_PARAM, char **argv)
{
archive_handle_t *archive_handle;
char *cpio_filename;
Expand Down
2 changes: 1 addition & 1 deletion archival/dpkg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ static void configure_package(deb_file_t *deb_file)
}

int dpkg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dpkg_main(int argc ATTRIBUTE_UNUSED, char **argv)
int dpkg_main(int argc UNUSED_PARAM, char **argv)
{
deb_file_t **deb_file = NULL;
status_node_t *status_node;
Expand Down
2 changes: 1 addition & 1 deletion archival/gzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -2043,7 +2043,7 @@ int gzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
#if ENABLE_GUNZIP
int gzip_main(int argc, char **argv)
#else
int gzip_main(int argc ATTRIBUTE_UNUSED, char **argv)
int gzip_main(int argc UNUSED_PARAM, char **argv)
#endif
{
unsigned opt;
Expand Down
2 changes: 1 addition & 1 deletion archival/libunarchive/decompress_unzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ static void huft_free_all(STATE_PARAM_ONLY)
inflate_codes_td = NULL;
}

static void abort_unzip(STATE_PARAM_ONLY) ATTRIBUTE_NORETURN;
static void abort_unzip(STATE_PARAM_ONLY) NORETURN;
static void abort_unzip(STATE_PARAM_ONLY)
{
huft_free_all(PASS_STATE_ONLY);
Expand Down
2 changes: 1 addition & 1 deletion archival/libunarchive/header_skip.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
#include "libbb.h"
#include "unarchive.h"

void FAST_FUNC header_skip(const file_header_t *file_header ATTRIBUTE_UNUSED)
void FAST_FUNC header_skip(const file_header_t *file_header UNUSED_PARAM)
{
}
4 changes: 2 additions & 2 deletions archival/tar.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ static int exclude_file(const llist_t *excluded_files, const char *file)
#endif

static int FAST_FUNC writeFileToTarball(const char *fileName, struct stat *statbuf,
void *userData, int depth ATTRIBUTE_UNUSED)
void *userData, int depth UNUSED_PARAM)
{
struct TarBallInfo *tbInfo = (struct TarBallInfo *) userData;
const char *header_name;
Expand Down Expand Up @@ -800,7 +800,7 @@ static const char tar_longopts[] ALIGN1 =
#endif

int tar_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tar_main(int argc ATTRIBUTE_UNUSED, char **argv)
int tar_main(int argc UNUSED_PARAM, char **argv)
{
char FAST_FUNC (*get_header_ptr)(archive_handle_t *) = get_header_tar;
archive_handle_t *tar_handle;
Expand Down
10 changes: 5 additions & 5 deletions archival/unzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ typedef union {
uint16_t method; /* 4-5 */
uint16_t modtime; /* 6-7 */
uint16_t moddate; /* 8-9 */
uint32_t crc32 ATTRIBUTE_PACKED; /* 10-13 */
uint32_t cmpsize ATTRIBUTE_PACKED; /* 14-17 */
uint32_t ucmpsize ATTRIBUTE_PACKED; /* 18-21 */
uint32_t crc32 PACKED; /* 10-13 */
uint32_t cmpsize PACKED; /* 14-17 */
uint32_t ucmpsize PACKED; /* 18-21 */
uint16_t filename_len; /* 22-23 */
uint16_t extra_len; /* 24-25 */
} formatted ATTRIBUTE_PACKED;
} zip_header_t; /* ATTRIBUTE_PACKED - gcc 4.2.1 doesn't like it (spews warning) */
} formatted PACKED;
} zip_header_t; /* PACKED - gcc 4.2.1 doesn't like it (spews warning) */

/* Check the offset of the last element, not the length. This leniency
* allows for poor packing, whereby the overall struct may be too long,
Expand Down
2 changes: 1 addition & 1 deletion console-tools/clear.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "libbb.h"

int clear_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int clear_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
int clear_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
return printf("\033[H\033[J") != 6;
}
2 changes: 1 addition & 1 deletion console-tools/deallocvt.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
enum { VT_DISALLOCATE = 0x5608 }; /* free memory associated to vt */

int deallocvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int deallocvt_main(int argc ATTRIBUTE_UNUSED, char **argv)
int deallocvt_main(int argc UNUSED_PARAM, char **argv)
{
/* num = 0 deallocate all unused consoles */
int num = 0;
Expand Down
2 changes: 1 addition & 1 deletion console-tools/dumpkmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct kbentry {
#define MAX_NR_KEYMAPS 256

int dumpkmap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dumpkmap_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv)
int dumpkmap_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
struct kbentry ke;
int i, j, fd;
Expand Down
2 changes: 1 addition & 1 deletion console-tools/kbd_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <linux/kd.h>

int kbd_mode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int kbd_mode_main(int ATTRIBUTE_UNUSED argc, char **argv)
int kbd_mode_main(int argc UNUSED_PARAM, char **argv)
{
int fd;
unsigned opt;
Expand Down
2 changes: 1 addition & 1 deletion console-tools/loadfont.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static void loadnewfont(int fd)
}

int loadfont_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int loadfont_main(int argc, char **argv ATTRIBUTE_UNUSED)
int loadfont_main(int argc, char **argv UNUSED_PARAM)
{
int fd;

Expand Down
2 changes: 1 addition & 1 deletion console-tools/loadkmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct kbentry {
#define MAX_NR_KEYMAPS 256

int loadkmap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int loadkmap_main(int ATTRIBUTE_UNUSED argc, char **argv ATTRIBUTE_UNUSED)
int loadkmap_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
struct kbentry ke;
int i, j, fd;
Expand Down
2 changes: 1 addition & 1 deletion console-tools/openvt.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static NOINLINE void vfork_child(char **argv)
}

int openvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int openvt_main(int argc ATTRIBUTE_UNUSED, char **argv)
int openvt_main(int argc UNUSED_PARAM, char **argv)
{
char vtname[sizeof(VC_FORMAT) + sizeof(int)*3];
struct vt_stat vtstat;
Expand Down
2 changes: 1 addition & 1 deletion console-tools/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int stty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
#endif

int reset_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int reset_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
int reset_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
static const char *const args[] = {
"stty", "sane", NULL
Expand Down
4 changes: 2 additions & 2 deletions console-tools/resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
#define old_termios (*(struct termios*)&bb_common_bufsiz1)

static void
onintr(int sig ATTRIBUTE_UNUSED)
onintr(int sig UNUSED_PARAM)
{
tcsetattr(STDERR_FILENO, TCSANOW, &old_termios);
exit(EXIT_FAILURE);
}

int resize_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int resize_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
int resize_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
struct termios new;
struct winsize w = { 0, 0, 0, 0 };
Expand Down
2 changes: 1 addition & 1 deletion console-tools/setconsole.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "libbb.h"

int setconsole_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int setconsole_main(int ATTRIBUTE_UNUSED argc, char **argv)
int setconsole_main(int argc UNUSED_PARAM, char **argv)
{
const char *device = CURRENT_TTY;
bool reset;
Expand Down
2 changes: 1 addition & 1 deletion console-tools/setlogcons.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "libbb.h"

int setlogcons_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int setlogcons_main(int argc ATTRIBUTE_UNUSED, char **argv)
int setlogcons_main(int argc UNUSED_PARAM, char **argv)
{
struct {
char fn;
Expand Down
2 changes: 1 addition & 1 deletion coreutils/cat.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int bb_cat(char **argv)
}

int cat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cat_main(int argc ATTRIBUTE_UNUSED, char **argv)
int cat_main(int argc UNUSED_PARAM, char **argv)
{
getopt32(argv, "u");
argv += optind;
Expand Down
2 changes: 1 addition & 1 deletion coreutils/catv.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "libbb.h"

int catv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int catv_main(int argc ATTRIBUTE_UNUSED, char **argv)
int catv_main(int argc UNUSED_PARAM, char **argv)
{
int retval = EXIT_SUCCESS;
int fd;
Expand Down
2 changes: 1 addition & 1 deletion coreutils/chmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf, void
}

int chmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chmod_main(int argc ATTRIBUTE_UNUSED, char **argv)
int chmod_main(int argc UNUSED_PARAM, char **argv)
{
int retval = EXIT_SUCCESS;
char *arg, **argp;
Expand Down
4 changes: 2 additions & 2 deletions coreutils/chown.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ typedef int (*chown_fptr)(const char *, uid_t, gid_t);
static struct bb_uidgid_t ugid = { -1, -1 };

static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf,
void *cf, int depth ATTRIBUTE_UNUSED)
void *cf, int depth UNUSED_PARAM)
{
uid_t u = (ugid.uid == (uid_t)-1) ? statbuf->st_uid : ugid.uid;
gid_t g = (ugid.gid == (gid_t)-1) ? statbuf->st_gid : ugid.gid;
Expand All @@ -61,7 +61,7 @@ static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf,
return FALSE;
}

int chown_main(int argc ATTRIBUTE_UNUSED, char **argv)
int chown_main(int argc UNUSED_PARAM, char **argv)
{
int retval = EXIT_SUCCESS;
int flags;
Expand Down
2 changes: 1 addition & 1 deletion coreutils/cksum.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "libbb.h"

int cksum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cksum_main(int argc ATTRIBUTE_UNUSED, char **argv)
int cksum_main(int argc UNUSED_PARAM, char **argv)
{
uint32_t *crc32_table = crc32_filltable(NULL, 1);
uint32_t crc;
Expand Down
2 changes: 1 addition & 1 deletion coreutils/comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static void writeline(char *line, int class, int flags)
}

int comm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int comm_main(int argc ATTRIBUTE_UNUSED, char **argv)
int comm_main(int argc UNUSED_PARAM, char **argv)
{
#define LINE_LEN 100
#define BB_EOF_0 0x1
Expand Down
2 changes: 1 addition & 1 deletion coreutils/cut.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static void cut_file(FILE *file, char delim)
}

int cut_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cut_main(int argc ATTRIBUTE_UNUSED, char **argv)
int cut_main(int argc UNUSED_PARAM, char **argv)
{
char delim = '\t'; /* delimiter, default is tab */
char *sopt, *ltok;
Expand Down
2 changes: 1 addition & 1 deletion coreutils/date.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static void maybe_set_utc(int opt)
}

int date_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int date_main(int argc ATTRIBUTE_UNUSED, char **argv)
int date_main(int argc UNUSED_PARAM, char **argv)
{
struct tm tm_time;
time_t tm;
Expand Down
4 changes: 2 additions & 2 deletions coreutils/dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct globals {
#define INIT_G() memset(&G, 0, sizeof(G))


static void dd_output_status(int ATTRIBUTE_UNUSED cur_signal)
static void dd_output_status(int UNUSED_PARAM cur_signal)
{
/* Deliberately using %u, not %d */
fprintf(stderr, "%"OFF_FMT"u+%"OFF_FMT"u records in\n"
Expand Down Expand Up @@ -79,7 +79,7 @@ static bool write_and_stats(const void *buf, size_t len, size_t obs,
#endif

int dd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dd_main(int argc ATTRIBUTE_UNUSED, char **argv)
int dd_main(int argc UNUSED_PARAM, char **argv)
{
enum {
/* Must be in the same order as OP_conv_XXX! */
Expand Down
2 changes: 1 addition & 1 deletion coreutils/du.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static unsigned long du(const char *filename)
}

int du_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int du_main(int argc ATTRIBUTE_UNUSED, char **argv)
int du_main(int argc UNUSED_PARAM, char **argv)
{
unsigned long total;
int slink_depth_save;
Expand Down
2 changes: 1 addition & 1 deletion coreutils/echo.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

/* NB: can be used by shell even if not enabled as applet */

int echo_main(int argc ATTRIBUTE_UNUSED, char **argv)
int echo_main(int argc UNUSED_PARAM, char **argv)
{
const char *arg;
#if !ENABLE_FEATURE_FANCY_ECHO
Expand Down
2 changes: 1 addition & 1 deletion coreutils/env.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static const char env_longopts[] ALIGN1 =
#endif

int env_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int env_main(int argc ATTRIBUTE_UNUSED, char **argv)
int env_main(int argc UNUSED_PARAM, char **argv)
{
/* cleanenv was static - why? */
char *cleanenv[1];
Expand Down
2 changes: 1 addition & 1 deletion coreutils/expand.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static void unexpand(FILE *file, unsigned int tab_size, unsigned opt)
#endif

int expand_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int expand_main(int argc ATTRIBUTE_UNUSED, char **argv)
int expand_main(int argc UNUSED_PARAM, char **argv)
{
/* Default 8 spaces for 1 tab */
const char *opt_t = "8";
Expand Down
Loading

0 comments on commit a60f84e

Please sign in to comment.