From a60f84ebf07863e390b72a2b6150e461a1ec18e9 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 5 Jul 2008 09:18:54 +0000 Subject: *: rename ATTRIBUTE_XXX to just XXX. --- applets/applets.c | 2 +- archival/bbunzip.c | 8 +-- archival/bz/bzlib_private.h | 4 +- archival/bzip2.c | 2 +- archival/cpio.c | 2 +- archival/dpkg.c | 2 +- archival/gzip.c | 2 +- archival/libunarchive/decompress_unzip.c | 2 +- archival/libunarchive/header_skip.c | 2 +- archival/tar.c | 4 +- archival/unzip.c | 10 ++-- console-tools/clear.c | 2 +- console-tools/deallocvt.c | 2 +- console-tools/dumpkmap.c | 2 +- console-tools/kbd_mode.c | 2 +- console-tools/loadfont.c | 2 +- console-tools/loadkmap.c | 2 +- console-tools/openvt.c | 2 +- console-tools/reset.c | 2 +- console-tools/resize.c | 4 +- console-tools/setconsole.c | 2 +- console-tools/setlogcons.c | 2 +- coreutils/cat.c | 2 +- coreutils/catv.c | 2 +- coreutils/chmod.c | 2 +- coreutils/chown.c | 4 +- coreutils/cksum.c | 2 +- coreutils/comm.c | 2 +- coreutils/cut.c | 2 +- coreutils/date.c | 2 +- coreutils/dd.c | 4 +- coreutils/du.c | 2 +- coreutils/echo.c | 2 +- coreutils/env.c | 2 +- coreutils/expand.c | 2 +- coreutils/false.c | 2 +- coreutils/hostid.c | 2 +- coreutils/id.c | 2 +- coreutils/logname.c | 2 +- coreutils/ls.c | 2 +- coreutils/md5_sha1_sum.c | 2 +- coreutils/mkfifo.c | 2 +- coreutils/od_bloaty.c | 6 +-- coreutils/printenv.c | 2 +- coreutils/printf.c | 2 +- coreutils/pwd.c | 2 +- coreutils/readlink.c | 2 +- coreutils/realpath.c | 2 +- coreutils/rm.c | 2 +- coreutils/rmdir.c | 2 +- coreutils/sleep.c | 2 +- coreutils/sort.c | 2 +- coreutils/split.c | 2 +- coreutils/stty.c | 4 +- coreutils/sum.c | 2 +- coreutils/sync.c | 2 +- coreutils/tac.c | 2 +- coreutils/test.c | 2 +- coreutils/touch.c | 2 +- coreutils/tr.c | 2 +- coreutils/true.c | 2 +- coreutils/tty.c | 2 +- coreutils/uname.c | 2 +- coreutils/uniq.c | 2 +- coreutils/usleep.c | 2 +- coreutils/uudecode.c | 2 +- coreutils/wc.c | 2 +- coreutils/who.c | 2 +- coreutils/whoami.c | 2 +- debianutils/mktemp.c | 2 +- debianutils/pipe_progress.c | 2 +- debianutils/run_parts.c | 4 +- debianutils/start_stop_daemon.c | 2 +- debianutils/which.c | 2 +- e2fsprogs/chattr.c | 2 +- e2fsprogs/fsck.c | 4 +- e2fsprogs/lsattr.c | 4 +- e2fsprogs/old_e2fsprogs/ext2fs/getsize.c | 2 +- e2fsprogs/old_e2fsprogs/uuid/uuid.h | 2 +- editors/awk.c | 4 +- editors/cmp.c | 2 +- editors/diff.c | 6 +-- editors/ed.c | 2 +- editors/patch.c | 2 +- editors/sed.c | 2 +- editors/vi.c | 6 +-- findutils/find.c | 10 ++-- findutils/grep.c | 4 +- findutils/xargs.c | 2 +- include/libbb.h | 18 +++---- include/platform.h | 20 ++++---- init/halt.c | 2 +- init/init.c | 16 +++--- libbb/appletlib.c | 2 +- libbb/bb_askpass.c | 2 +- libbb/messages.c | 2 +- libbb/recursive_action.c | 8 +-- loginutils/addgroup.c | 2 +- loginutils/adduser.c | 4 +- loginutils/chpasswd.c | 2 +- loginutils/cryptpw.c | 2 +- loginutils/getty.c | 2 +- loginutils/login.c | 4 +- loginutils/passwd.c | 2 +- loginutils/su.c | 2 +- loginutils/sulogin.c | 4 +- loginutils/vlock.c | 6 +-- miscutils/bbconfig.c | 2 +- miscutils/chat.c | 4 +- miscutils/chrt.c | 2 +- miscutils/crond.c | 2 +- miscutils/crontab.c | 2 +- miscutils/dc.c | 2 +- miscutils/devfsd.c | 2 +- miscutils/eject.c | 2 +- miscutils/fbsplash.c | 2 +- miscutils/hdparm.c | 4 +- miscutils/inotifyd.c | 2 +- miscutils/last.c | 2 +- miscutils/last_fancy.c | 2 +- miscutils/man.c | 2 +- miscutils/microcom.c | 2 +- miscutils/mt.c | 2 +- miscutils/rx.c | 2 +- miscutils/setsid.c | 2 +- miscutils/strings.c | 2 +- miscutils/taskset.c | 2 +- miscutils/time.c | 2 +- miscutils/watchdog.c | 2 +- modutils/depmod.c | 4 +- modutils/insmod.c | 10 ++-- modutils/lsmod.c | 4 +- modutils/modprobe-small.c | 6 +-- networking/arp.c | 2 +- networking/arping.c | 4 +- networking/brctl.c | 2 +- networking/dnsd.c | 2 +- networking/ether-wake.c | 2 +- networking/ftpgetput.c | 4 +- networking/httpd.c | 24 ++++----- networking/ifenslave.c | 2 +- networking/ifupdown.c | 10 ++-- networking/inetd.c | 22 ++++---- networking/interface.c | 2 +- networking/ip.c | 14 +++--- networking/isrv_identd.c | 4 +- networking/libiproute/ip_common.h | 2 +- networking/libiproute/ipaddress.c | 4 +- networking/libiproute/iplink.c | 2 +- networking/libiproute/iproute.c | 4 +- networking/libiproute/iprule.c | 4 +- networking/libiproute/ll_map.c | 4 +- networking/libiproute/utils.c | 2 +- networking/libiproute/utils.h | 8 +-- networking/nc.c | 2 +- networking/nc_bloaty.c | 4 +- networking/netstat.c | 2 +- networking/ping.c | 14 +++--- networking/pscan.c | 2 +- networking/route.c | 2 +- networking/sendmail.c | 2 +- networking/slattach.c | 6 +-- networking/tcpudp.c | 4 +- networking/telnet.c | 2 +- networking/telnetd.c | 4 +- networking/tftp.c | 4 +- networking/traceroute.c | 2 +- networking/udhcp/arpping.c | 2 +- networking/udhcp/common.h | 4 +- networking/udhcp/dhcpc.c | 2 +- networking/udhcp/dhcpd.c | 2 +- networking/udhcp/dhcprelay.c | 2 +- networking/udhcp/dumpleases.c | 2 +- networking/udhcp/files.c | 2 +- networking/wget.c | 4 +- networking/zcip.c | 2 +- printutils/lpd.c | 2 +- printutils/lpr.c | 2 +- procps/fuser.c | 2 +- procps/nmeter.c | 18 +++---- procps/pgrep.c | 2 +- procps/pidof.c | 2 +- procps/ps.c | 4 +- procps/renice.c | 2 +- procps/sysctl.c | 2 +- procps/top.c | 4 +- procps/uptime.c | 2 +- procps/watch.c | 2 +- runit/chpst.c | 18 +++---- runit/runit_lib.h | 6 +-- runit/runsv.c | 6 +-- runit/runsvdir.c | 6 +-- runit/sv.c | 4 +- runit/svlogd.c | 8 +-- selinux/chcon.c | 8 +-- selinux/getenforce.c | 2 +- selinux/load_policy.c | 2 +- selinux/matchpathcon.c | 2 +- selinux/runcon.c | 2 +- selinux/selinuxenabled.c | 2 +- selinux/sestatus.c | 2 +- selinux/setfiles.c | 6 +-- shell/ash.c | 86 ++++++++++++++++---------------- shell/cttyhack.c | 2 +- shell/hush.c | 20 ++++---- shell/lash_unused.c | 8 +-- shell/msh.c | 48 +++++++++--------- sysklogd/klogd.c | 2 +- sysklogd/logread.c | 6 +-- sysklogd/syslogd.c | 4 +- util-linux/dmesg.c | 2 +- util-linux/fdformat.c | 2 +- util-linux/fdisk.c | 4 +- util-linux/fsck_minix.c | 4 +- util-linux/hwclock.c | 2 +- util-linux/ipcs.c | 2 +- util-linux/mdev.c | 10 ++-- util-linux/mkfs_minix.c | 4 +- util-linux/more.c | 4 +- util-linux/mount.c | 6 +-- util-linux/rdate.c | 4 +- util-linux/readprofile.c | 2 +- util-linux/rtcwake.c | 2 +- util-linux/script.c | 4 +- util-linux/setarch.c | 2 +- util-linux/swaponoff.c | 2 +- util-linux/switch_root.c | 2 +- util-linux/umount.c | 4 +- 228 files changed, 479 insertions(+), 479 deletions(-) diff --git a/applets/applets.c b/applets/applets.c index fbe7666..133a215 100644 --- a/applets/applets.c +++ b/applets/applets.c @@ -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); } diff --git a/archival/bbunzip.c b/archival/bbunzip.c index b2e8161..65bb8b7 100644 --- a/archival/bbunzip.c +++ b/archival/bbunzip.c @@ -165,7 +165,7 @@ USE_DESKTOP(long long) int unpack_bunzip2(void) } int bunzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int bunzip2_main(int argc ATTRIBUTE_UNUSED, char **argv) +int bunzip2_main(int argc UNUSED_PARAM, char **argv) { getopt32(argv, "cfvdt"); argv += optind; @@ -277,7 +277,7 @@ USE_DESKTOP(long long) int unpack_gunzip(void) */ int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int gunzip_main(int argc ATTRIBUTE_UNUSED, char **argv) +int gunzip_main(int argc UNUSED_PARAM, char **argv) { getopt32(argv, "cfvdtn"); argv += optind; @@ -315,7 +315,7 @@ USE_DESKTOP(long long) int unpack_unlzma(void) } int unlzma_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int unlzma_main(int argc ATTRIBUTE_UNUSED, char **argv) +int unlzma_main(int argc UNUSED_PARAM, char **argv) { getopt32(argv, "cf"); argv += optind; @@ -357,7 +357,7 @@ USE_DESKTOP(long long) int unpack_uncompress(void) } int uncompress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int uncompress_main(int argc ATTRIBUTE_UNUSED, char **argv) +int uncompress_main(int argc UNUSED_PARAM, char **argv) { getopt32(argv, "cf"); argv += optind; diff --git a/archival/bz/bzlib_private.h b/archival/bz/bzlib_private.h index 48676a3..6430ce4 100644 --- a/archival/bz/bzlib_private.h +++ b/archival/bz/bzlib_private.h @@ -33,7 +33,7 @@ typedef unsigned char Bool; #define False ((Bool)0) #if BZ_LIGHT_DEBUG -static void bz_assert_fail(int errcode) ATTRIBUTE_NORETURN; +static void bz_assert_fail(int errcode) NORETURN; #define AssertH(cond, errcode) \ do { \ if (!(cond)) \ @@ -170,7 +170,7 @@ typedef struct EState { /* map of bytes used in block */ int32_t nInUse; - Bool inUse[256] __attribute__(( aligned(sizeof(long)) )); + Bool inUse[256] ALIGNED(sizeof(long)); uint8_t unseqToSeq[256]; /* stuff for coding the MTF values */ diff --git a/archival/bzip2.c b/archival/bzip2.c index 62df4aa..1149cad 100644 --- a/archival/bzip2.c +++ b/archival/bzip2.c @@ -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; diff --git a/archival/cpio.c b/archival/cpio.c index a10bfa8..4c9fb1f 100644 --- a/archival/cpio.c +++ b/archival/cpio.c @@ -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; diff --git a/archival/dpkg.c b/archival/dpkg.c index 22e26f5..637afce 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c @@ -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; diff --git a/archival/gzip.c b/archival/gzip.c index 5c9d6b3..ee05135 100644 --- a/archival/gzip.c +++ b/archival/gzip.c @@ -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; diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c index 3b0ca84..f25808a 100644 --- a/archival/libunarchive/decompress_unzip.c +++ b/archival/libunarchive/decompress_unzip.c @@ -244,7 +244,7 @@ static void huft_free_all(STATE_PARAM_ONLY) 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); diff --git a/archival/libunarchive/header_skip.c b/archival/libunarchive/header_skip.c index ba4c0ab..a97a9ce 100644 --- a/archival/libunarchive/header_skip.c +++ b/archival/libunarchive/header_skip.c @@ -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) { } diff --git a/archival/tar.c b/archival/tar.c index bb8920a..13cdbd9 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -397,7 +397,7 @@ static int exclude_file(const llist_t *excluded_files, const char *file) #endif static int FAST_FUNC writeFileToTarball(const char *fileName, struct stat *statbuf, - void *userData, int depth ATTRIBUTE_UNUSED) + void *userData, int depth UNUSED_PARAM) { struct TarBallInfo *tbInfo = (struct TarBallInfo *) userData; const char *header_name; @@ -800,7 +800,7 @@ static const char tar_longopts[] ALIGN1 = #endif int tar_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int tar_main(int argc ATTRIBUTE_UNUSED, char **argv) +int tar_main(int argc UNUSED_PARAM, char **argv) { char FAST_FUNC (*get_header_ptr)(archive_handle_t *) = get_header_tar; archive_handle_t *tar_handle; diff --git a/archival/unzip.c b/archival/unzip.c index 2c89712..7c92f5d 100644 --- a/archival/unzip.c +++ b/archival/unzip.c @@ -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, diff --git a/console-tools/clear.c b/console-tools/clear.c index 0d94e35..8b727b3 100644 --- a/console-tools/clear.c +++ b/console-tools/clear.c @@ -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; } diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c index 1200cae..e9a3989 100644 --- a/console-tools/deallocvt.c +++ b/console-tools/deallocvt.c @@ -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; diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c index 1adfdd7..1d6bbdc 100644 --- a/console-tools/dumpkmap.c +++ b/console-tools/dumpkmap.c @@ -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; diff --git a/console-tools/kbd_mode.c b/console-tools/kbd_mode.c index 1614957..e155881 100644 --- a/console-tools/kbd_mode.c +++ b/console-tools/kbd_mode.c @@ -14,7 +14,7 @@ #include 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; diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c index 843f4b0..48b2980 100644 --- a/console-tools/loadfont.c +++ b/console-tools/loadfont.c @@ -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; diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c index 28e53eb..b891c9b 100644 --- a/console-tools/loadkmap.c +++ b/console-tools/loadkmap.c @@ -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; diff --git a/console-tools/openvt.c b/console-tools/openvt.c index 2085224..0906de4 100644 --- a/console-tools/openvt.c +++ b/console-tools/openvt.c @@ -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; diff --git a/console-tools/reset.c b/console-tools/reset.c index 5d5d4e2..6917eda 100644 --- a/console-tools/reset.c +++ b/console-tools/reset.c @@ -18,7 +18,7 @@ int stty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; #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 diff --git a/console-tools/resize.c b/console-tools/resize.c index 8a50f9d..ea7fe5f 100644 --- a/console-tools/resize.c +++ b/console-tools/resize.c @@ -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 }; diff --git a/console-tools/setconsole.c b/console-tools/setconsole.c index 82fe83f..b685937 100644 --- a/console-tools/setconsole.c +++ b/console-tools/setconsole.c @@ -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; diff --git a/console-tools/setlogcons.c b/console-tools/setlogcons.c index aa8e080..dd44591 100644 --- a/console-tools/setlogcons.c +++ b/console-tools/setlogcons.c @@ -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; diff --git a/coreutils/cat.c b/coreutils/cat.c index 989147b..0024eb8 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c @@ -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; diff --git a/coreutils/catv.c b/coreutils/catv.c index b87740e..ff3139c 100644 --- a/coreutils/catv.c +++ b/coreutils/catv.c @@ -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; diff --git a/coreutils/chmod.c b/coreutils/chmod.c index 994308c..40f681f 100644 --- a/coreutils/chmod.c +++ b/coreutils/chmod.c @@ -68,7 +68,7 @@ static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf, void } 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; diff --git a/coreutils/chown.c b/coreutils/chown.c index c14c62d..b3d974a 100644 --- a/coreutils/chown.c +++ b/coreutils/chown.c @@ -42,7 +42,7 @@ typedef int (*chown_fptr)(const char *, uid_t, gid_t); static struct bb_uidgid_t ugid = { -1, -1 }; static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf, - void *cf, int depth ATTRIBUTE_UNUSED) + void *cf, int depth UNUSED_PARAM) { uid_t u = (ugid.uid == (uid_t)-1) ? statbuf->st_uid : ugid.uid; gid_t g = (ugid.gid == (gid_t)-1) ? statbuf->st_gid : ugid.gid; @@ -61,7 +61,7 @@ static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf, return FALSE; } -int chown_main(int argc ATTRIBUTE_UNUSED, char **argv) +int chown_main(int argc UNUSED_PARAM, char **argv) { int retval = EXIT_SUCCESS; int flags; diff --git a/coreutils/cksum.c b/coreutils/cksum.c index 074d068..5987184 100644 --- a/coreutils/cksum.c +++ b/coreutils/cksum.c @@ -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; diff --git a/coreutils/comm.c b/coreutils/comm.c index 4dbc0d4..b62c987 100644 --- a/coreutils/comm.c +++ b/coreutils/comm.c @@ -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 diff --git a/coreutils/cut.c b/coreutils/cut.c index 1634fc8..1798549 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c @@ -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; diff --git a/coreutils/date.c b/coreutils/date.c index 5b0f60f..8469190 100644 --- a/coreutils/date.c +++ b/coreutils/date.c @@ -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; diff --git a/coreutils/dd.c b/coreutils/dd.c index 6b66366..8a40aa7 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c @@ -41,7 +41,7 @@ struct globals { #define INIT_G() memset(&G, 0, sizeof(G)) -static void dd_output_status(int ATTRIBUTE_UNUSED cur_signal) +static void dd_output_status(int UNUSED_PARAM cur_signal) { /* Deliberately using %u, not %d */ fprintf(stderr, "%"OFF_FMT"u+%"OFF_FMT"u records in\n" @@ -79,7 +79,7 @@ static bool write_and_stats(const void *buf, size_t len, size_t obs, #endif int dd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int dd_main(int argc ATTRIBUTE_UNUSED, char **argv) +int dd_main(int argc UNUSED_PARAM, char **argv) { enum { /* Must be in the same order as OP_conv_XXX! */ diff --git a/coreutils/du.c b/coreutils/du.c index b469824..efc9bb9 100644 --- a/coreutils/du.c +++ b/coreutils/du.c @@ -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; diff --git a/coreutils/echo.c b/coreutils/echo.c index cc9b9e6..36cb6b3 100644 --- a/coreutils/echo.c +++ b/coreutils/echo.c @@ -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 diff --git a/coreutils/env.c b/coreutils/env.c index 8d8753e..66199e8 100644 --- a/coreutils/env.c +++ b/coreutils/env.c @@ -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]; diff --git a/coreutils/expand.c b/coreutils/expand.c index af2ef86..ee51c03 100644 --- a/coreutils/expand.c +++ b/coreutils/expand.c @@ -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"; diff --git a/coreutils/false.c b/coreutils/false.c index e312136..f448ebf 100644 --- a/coreutils/false.c +++ b/coreutils/false.c @@ -15,7 +15,7 @@ /* This is a NOFORK applet. Be very careful! */ int false_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv) +int false_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) { return EXIT_FAILURE; } diff --git a/coreutils/hostid.c b/coreutils/hostid.c index 433eccc..2794510 100644 --- a/coreutils/hostid.c +++ b/coreutils/hostid.c @@ -14,7 +14,7 @@ /* This is a NOFORK applet. Be very careful! */ int hostid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv) +int hostid_main(int argc, char **argv UNUSED_PARAM) { if (argc > 1) { bb_show_usage(); diff --git a/coreutils/id.c b/coreutils/id.c index 9afb100..0fadd98 100644 --- a/coreutils/id.c +++ b/coreutils/id.c @@ -37,7 +37,7 @@ static int printf_full(unsigned int id, const char *arg, const char prefix) } 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; diff --git a/coreutils/logname.c b/coreutils/logname.c index 09fd396..3400c30 100644 --- a/coreutils/logname.c +++ b/coreutils/logname.c @@ -25,7 +25,7 @@ /* This is a NOFORK applet. Be very careful! */ int logname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int logname_main(int argc, char ATTRIBUTE_UNUSED **argv) +int logname_main(int argc, char **argv UNUSED_PARAM) { char buf[128]; diff --git a/coreutils/ls.c b/coreutils/ls.c index 7fddefe..a76ced1 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -825,7 +825,7 @@ static const char ls_color_opt[] ALIGN1 = int ls_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int ls_main(int argc ATTRIBUTE_UNUSED, char **argv) +int ls_main(int argc UNUSED_PARAM, char **argv) { struct dnode **dnd; struct dnode **dnf; diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c index 8690f40..a568158 100644 --- a/coreutils/md5_sha1_sum.c +++ b/coreutils/md5_sha1_sum.c @@ -75,7 +75,7 @@ static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo) } 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; diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c index d9261b9..6549460 100644 --- a/coreutils/mkfifo.c +++ b/coreutils/mkfifo.c @@ -14,7 +14,7 @@ #include "libcoreutils/coreutils.h" int mkfifo_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int mkfifo_main(int argc ATTRIBUTE_UNUSED, char **argv) +int mkfifo_main(int argc UNUSED_PARAM, char **argv) { mode_t mode; int retval = EXIT_SUCCESS; diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c index ce963db..a2eaf11 100644 --- a/coreutils/od_bloaty.c +++ b/coreutils/od_bloaty.c @@ -364,7 +364,7 @@ print_long_double(size_t n_bytes, const char *block, const char *fmt_string) static void print_named_ascii(size_t n_bytes, const char *block, - const char *unused_fmt_string ATTRIBUTE_UNUSED) + const char *unused_fmt_string UNUSED_PARAM) { /* Names for some non-printing characters. */ static const char charname[33][3] ALIGN1 = { @@ -404,7 +404,7 @@ print_named_ascii(size_t n_bytes, const char *block, static void print_ascii(size_t n_bytes, const char *block, - const char *unused_fmt_string ATTRIBUTE_UNUSED) + const char *unused_fmt_string UNUSED_PARAM) { // buf[N] pos: 01234 56789 char buf[12] = " x\0 0xx\0"; @@ -814,7 +814,7 @@ skip(off_t n_skip) typedef void FN_format_address(off_t address, char c); static void -format_address_none(off_t address ATTRIBUTE_UNUSED, char c ATTRIBUTE_UNUSED) +format_address_none(off_t address UNUSED_PARAM, char c UNUSED_PARAM) { } diff --git a/coreutils/printenv.c b/coreutils/printenv.c index 2fc01f2..6971f72 100644 --- a/coreutils/printenv.c +++ b/coreutils/printenv.c @@ -11,7 +11,7 @@ #include "libbb.h" int printenv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int printenv_main(int argc ATTRIBUTE_UNUSED, char **argv) +int printenv_main(int argc UNUSED_PARAM, char **argv) { /* no variables specified, show whole env */ if (!argv[1]) { diff --git a/coreutils/printf.c b/coreutils/printf.c index b775236..a14306f 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c @@ -279,7 +279,7 @@ static char **print_formatted(char *f, char **argv) return argv; } -int printf_main(int argc ATTRIBUTE_UNUSED, char **argv) +int printf_main(int argc UNUSED_PARAM, char **argv) { char *format; char **argv2; diff --git a/coreutils/pwd.c b/coreutils/pwd.c index 9279dbe..57953d2 100644 --- a/coreutils/pwd.c +++ b/coreutils/pwd.c @@ -12,7 +12,7 @@ /* This is a NOFORK applet. Be very careful! */ int pwd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int pwd_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) +int pwd_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) { char *buf; diff --git a/coreutils/readlink.c b/coreutils/readlink.c index 0c45e12..721fd85 100644 --- a/coreutils/readlink.c +++ b/coreutils/readlink.c @@ -10,7 +10,7 @@ #include "libbb.h" int readlink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int readlink_main(int argc ATTRIBUTE_UNUSED, char **argv) +int readlink_main(int argc UNUSED_PARAM, char **argv) { char *buf; char *fname; diff --git a/coreutils/realpath.c b/coreutils/realpath.c index 6766524..28906ba 100644 --- a/coreutils/realpath.c +++ b/coreutils/realpath.c @@ -13,7 +13,7 @@ #include "libbb.h" int realpath_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int realpath_main(int argc ATTRIBUTE_UNUSED, char **argv) +int realpath_main(int argc UNUSED_PARAM, char **argv) { int retval = EXIT_SUCCESS; diff --git a/coreutils/rm.c b/coreutils/rm.c index 1774ce2..975f226 100644 --- a/coreutils/rm.c +++ b/coreutils/rm.c @@ -20,7 +20,7 @@ /* This is a NOFORK applet. Be very careful! */ int rm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int rm_main(int argc ATTRIBUTE_UNUSED, char **argv) +int rm_main(int argc UNUSED_PARAM, char **argv) { int status = 0; int flags = 0; diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c index cb60466..2450a43 100644 --- a/coreutils/rmdir.c +++ b/coreutils/rmdir.c @@ -19,7 +19,7 @@ #define IGNORE_NON_EMPTY 0x02 int rmdir_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int rmdir_main(int argc ATTRIBUTE_UNUSED, char **argv) +int rmdir_main(int argc UNUSED_PARAM, char **argv) { int status = EXIT_SUCCESS; int flags; diff --git a/coreutils/sleep.c b/coreutils/sleep.c index 78f9a8e..162d820 100644 --- a/coreutils/sleep.c +++ b/coreutils/sleep.c @@ -34,7 +34,7 @@ static const struct suffix_mult sfx[] = { #endif int sleep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int sleep_main(int argc ATTRIBUTE_UNUSED, char **argv) +int sleep_main(int argc UNUSED_PARAM, char **argv) { unsigned duration; diff --git a/coreutils/sort.c b/coreutils/sort.c index 1f531fb..1fa5527 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c @@ -276,7 +276,7 @@ static unsigned str2u(char **str) #endif int sort_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int sort_main(int argc ATTRIBUTE_UNUSED, char **argv) +int sort_main(int argc UNUSED_PARAM, char **argv) { FILE *fp, *outfile = stdout; char *line, **lines = NULL; diff --git a/coreutils/split.c b/coreutils/split.c index 39f62e6..77cb66d 100644 --- a/coreutils/split.c +++ b/coreutils/split.c @@ -56,7 +56,7 @@ enum { READ_BUFFER_SIZE = COMMON_BUFSIZE - 1 }; #define SPLIT_OPT_a (1<<2) int split_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int split_main(int argc ATTRIBUTE_UNUSED, char **argv) +int split_main(int argc UNUSED_PARAM, char **argv) { unsigned suffix_len = 2; char *pfx; diff --git a/coreutils/stty.c b/coreutils/stty.c index c9f11a8..3605e3c 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c @@ -692,7 +692,7 @@ static void set_speed_or_die(enum speed_setting type, const char *const arg, } } -static ATTRIBUTE_NORETURN void perror_on_device_and_die(const char *fmt) +static NORETURN void perror_on_device_and_die(const char *fmt) { bb_perror_msg_and_die(fmt, G.device_name); } @@ -851,7 +851,7 @@ static int recover_mode(const char *arg, struct termios *mode) } static void display_recoverable(const struct termios *mode, - int ATTRIBUTE_UNUSED dummy) + int UNUSED_PARAM dummy) { int i; printf("%lx:%lx:%lx:%lx", diff --git a/coreutils/sum.c b/coreutils/sum.c index e6cfbfd..60f3b30 100644 --- a/coreutils/sum.c +++ b/coreutils/sum.c @@ -71,7 +71,7 @@ static unsigned sum_file(const char *file, unsigned type) } int sum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int sum_main(int argc ATTRIBUTE_UNUSED, char **argv) +int sum_main(int argc UNUSED_PARAM, char **argv) { unsigned n; unsigned type = SUM_BSD; diff --git a/coreutils/sync.c b/coreutils/sync.c index 5c9d092..f00a3d0 100644 --- a/coreutils/sync.c +++ b/coreutils/sync.c @@ -14,7 +14,7 @@ /* This is a NOFORK applet. Be very careful! */ int sync_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int sync_main(int argc, char **argv ATTRIBUTE_UNUSED) +int sync_main(int argc, char **argv UNUSED_PARAM) { /* coreutils-6.9 compat */ bb_warn_ignoring_args(argc - 1); diff --git a/coreutils/tac.c b/coreutils/tac.c index af70f30..d70e23a 100644 --- a/coreutils/tac.c +++ b/coreutils/tac.c @@ -26,7 +26,7 @@ struct lstring { }; int tac_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int tac_main(int argc ATTRIBUTE_UNUSED, char **argv) +int tac_main(int argc UNUSED_PARAM, char **argv) { char **name; FILE *f; diff --git a/coreutils/test.c b/coreutils/test.c index 270ca21..c7c5300 100644 --- a/coreutils/test.c +++ b/coreutils/test.c @@ -187,7 +187,7 @@ extern struct test_statics *const test_ptr_to_statics; static arith_t primary(enum token n); -static void syntax(const char *op, const char *msg) ATTRIBUTE_NORETURN; +static void syntax(const char *op, const char *msg) NORETURN; static void syntax(const char *op, const char *msg) { if (op && *op) { diff --git a/coreutils/touch.c b/coreutils/touch.c index 78ae4a5..92f2023 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c @@ -38,7 +38,7 @@ */ int touch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int touch_main(int argc ATTRIBUTE_UNUSED, char **argv) +int touch_main(int argc UNUSED_PARAM, char **argv) { #if ENABLE_DESKTOP struct utimbuf timebuf; diff --git a/coreutils/tr.c b/coreutils/tr.c index 8b2d308..e439fcb 100644 --- a/coreutils/tr.c +++ b/coreutils/tr.c @@ -174,7 +174,7 @@ static int complement(char *buffer, int buffer_len) } int tr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int tr_main(int argc ATTRIBUTE_UNUSED, char **argv) +int tr_main(int argc UNUSED_PARAM, char **argv) { int output_length = 0, input_length; int i; diff --git a/coreutils/true.c b/coreutils/true.c index 565e68b..8a7e6ae 100644 --- a/coreutils/true.c +++ b/coreutils/true.c @@ -15,7 +15,7 @@ /* This is a NOFORK applet. Be very careful! */ int true_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int true_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) +int true_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) { return EXIT_SUCCESS; } diff --git a/coreutils/tty.c b/coreutils/tty.c index 48e1511..e832894 100644 --- a/coreutils/tty.c +++ b/coreutils/tty.c @@ -13,7 +13,7 @@ #include "libbb.h" int tty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int tty_main(int argc, char **argv SKIP_INCLUDE_SUSv2(ATTRIBUTE_UNUSED)) +int tty_main(int argc, char **argv SKIP_INCLUDE_SUSv2(UNUSED_PARAM)) { const char *s; USE_INCLUDE_SUSv2(int silent;) /* Note: No longer relevant in SUSv3. */ diff --git a/coreutils/uname.c b/coreutils/uname.c index 76fd3ca..e28285c 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c @@ -49,7 +49,7 @@ static const unsigned short utsname_offset[] = { }; int uname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int uname_main(int argc ATTRIBUTE_UNUSED, char **argv) +int uname_main(int argc UNUSED_PARAM, char **argv) { uname_info_t uname_info; #if defined(__sparc__) && defined(__linux__) diff --git a/coreutils/uniq.c b/coreutils/uniq.c index 41f1fed..0918621 100644 --- a/coreutils/uniq.c +++ b/coreutils/uniq.c @@ -26,7 +26,7 @@ static FILE *xgetoptfile_uniq_s(char **argv, int read0write2) } int uniq_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int uniq_main(int argc ATTRIBUTE_UNUSED, char **argv) +int uniq_main(int argc UNUSED_PARAM, char **argv) { FILE *in, *out; const char *s0, *e0, *s1, *e1, *input_filename; diff --git a/coreutils/usleep.c b/coreutils/usleep.c index d34880d..e7acd5f 100644 --- a/coreutils/usleep.c +++ b/coreutils/usleep.c @@ -14,7 +14,7 @@ /* This is a NOFORK applet. Be very careful! */ int usleep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int usleep_main(int argc ATTRIBUTE_UNUSED, char **argv) +int usleep_main(int argc UNUSED_PARAM, char **argv) { if (!argv[1]) { bb_show_usage(); diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c index 8b18b7a..81a86cb 100644 --- a/coreutils/uudecode.c +++ b/coreutils/uudecode.c @@ -136,7 +136,7 @@ static void read_base64(FILE *src_stream, FILE *dst_stream) } int uudecode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int uudecode_main(int argc ATTRIBUTE_UNUSED, char **argv) +int uudecode_main(int argc UNUSED_PARAM, char **argv) { FILE *src_stream; char *outname = NULL; diff --git a/coreutils/wc.c b/coreutils/wc.c index de3c895..d0e5482 100644 --- a/coreutils/wc.c +++ b/coreutils/wc.c @@ -69,7 +69,7 @@ enum { }; int wc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int wc_main(int argc ATTRIBUTE_UNUSED, char **argv) +int wc_main(int argc UNUSED_PARAM, char **argv) { FILE *fp; const char *s, *arg; diff --git a/coreutils/who.c b/coreutils/who.c index a206ec5..a4ec740 100644 --- a/coreutils/who.c +++ b/coreutils/who.c @@ -41,7 +41,7 @@ static void idle_string(char *str6, time_t t) } int who_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int who_main(int argc ATTRIBUTE_UNUSED, char **argv) +int who_main(int argc UNUSED_PARAM, char **argv) { char str6[6]; struct utmp *ut; diff --git a/coreutils/whoami.c b/coreutils/whoami.c index d35572e..6756d4b 100644 --- a/coreutils/whoami.c +++ b/coreutils/whoami.c @@ -14,7 +14,7 @@ /* This is a NOFORK applet. Be very careful! */ int whoami_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int whoami_main(int argc, char **argv ATTRIBUTE_UNUSED) +int whoami_main(int argc, char **argv UNUSED_PARAM) { if (argc > 1) bb_show_usage(); diff --git a/debianutils/mktemp.c b/debianutils/mktemp.c index c48b6e2..0dcb1e8 100644 --- a/debianutils/mktemp.c +++ b/debianutils/mktemp.c @@ -35,7 +35,7 @@ #include "libbb.h" int mktemp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int mktemp_main(int argc ATTRIBUTE_UNUSED, char **argv) +int mktemp_main(int argc UNUSED_PARAM, char **argv) { const char *path; char *chp; diff --git a/debianutils/pipe_progress.c b/debianutils/pipe_progress.c index cbdd38f..fa98e8b 100644 --- a/debianutils/pipe_progress.c +++ b/debianutils/pipe_progress.c @@ -15,7 +15,7 @@ * Activity is indicated by a '.' to stderr */ int pipe_progress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int pipe_progress_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) +int pipe_progress_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) { RESERVE_CONFIG_BUFFER(buf, PIPE_PROGRESS_SIZE); time_t t = time(NULL); diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c index bf278cc..953ff67 100644 --- a/debianutils/run_parts.c +++ b/debianutils/run_parts.c @@ -77,7 +77,7 @@ static int bb_alphasort(const void *p1, const void *p2) return (option_mask32 & OPT_r) ? -r : r; } -static int FAST_FUNC act(const char *file, struct stat *statbuf, void *args ATTRIBUTE_UNUSED, int depth) +static int FAST_FUNC act(const char *file, struct stat *statbuf, void *args UNUSED_PARAM, int depth) { if (depth == 1) return TRUE; @@ -111,7 +111,7 @@ static const char runparts_longopts[] ALIGN1 = #endif int run_parts_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int run_parts_main(int argc ATTRIBUTE_UNUSED, char **argv) +int run_parts_main(int argc UNUSED_PARAM, char **argv) { const char *umask_p = "22"; llist_t *arg_list = NULL; diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c index 459fb77..91f51a3 100644 --- a/debianutils/start_stop_daemon.c +++ b/debianutils/start_stop_daemon.c @@ -320,7 +320,7 @@ static const char start_stop_daemon_longopts[] ALIGN1 = #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; diff --git a/debianutils/which.c b/debianutils/which.c index 41a864c..748e6dc 100644 --- a/debianutils/which.c +++ b/debianutils/which.c @@ -13,7 +13,7 @@ #include "libbb.h" int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int which_main(int argc ATTRIBUTE_UNUSED, char **argv) +int which_main(int argc UNUSED_PARAM, char **argv) { USE_DESKTOP(int opt;) int status = EXIT_SUCCESS; diff --git a/e2fsprogs/chattr.c b/e2fsprogs/chattr.c index e783d3e..b41919b 100644 --- a/e2fsprogs/chattr.c +++ b/e2fsprogs/chattr.c @@ -125,7 +125,7 @@ static void change_attributes(const char *name, struct globals *gp) } int chattr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int chattr_main(int argc ATTRIBUTE_UNUSED, char **argv) +int chattr_main(int argc UNUSED_PARAM, char **argv) { struct globals g; char *arg; diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c index 0707d29..c176936 100644 --- a/e2fsprogs/fsck.c +++ b/e2fsprogs/fsck.c @@ -1122,13 +1122,13 @@ static void parse_args(char **argv) max_running = xatoi(tmp); } -static void signal_cancel(int sig ATTRIBUTE_UNUSED) +static void signal_cancel(int sig UNUSED_PARAM) { cancel_requested = 1; } int fsck_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int fsck_main(int argc ATTRIBUTE_UNUSED, char **argv) +int fsck_main(int argc UNUSED_PARAM, char **argv) { int i, status; /*int interactive;*/ diff --git a/e2fsprogs/lsattr.c b/e2fsprogs/lsattr.c index 066af86..23a54b7 100644 --- a/e2fsprogs/lsattr.c +++ b/e2fsprogs/lsattr.c @@ -58,7 +58,7 @@ static void list_attributes(const char *name) } static int lsattr_dir_proc(const char *dir_name, struct dirent *de, - void *private ATTRIBUTE_UNUSED) + void *private UNUSED_PARAM) { struct stat st; char *path; @@ -96,7 +96,7 @@ static void lsattr_args(const char *name) } int lsattr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int lsattr_main(int argc ATTRIBUTE_UNUSED, char **argv) +int lsattr_main(int argc UNUSED_PARAM, char **argv) { getopt32(argv, "Radlv"); argv += optind; diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c b/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c index 63a0dca..ff11fe9 100644 --- a/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c +++ b/e2fsprogs/old_e2fsprogs/ext2fs/getsize.c @@ -78,7 +78,7 @@ errcode_t ext2fs_get_device_size(const char *file, int blocksize, 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; diff --git a/e2fsprogs/old_e2fsprogs/uuid/uuid.h b/e2fsprogs/old_e2fsprogs/uuid/uuid.h index bd53b15..b30ca3c 100644 --- a/e2fsprogs/old_e2fsprogs/uuid/uuid.h +++ b/e2fsprogs/old_e2fsprogs/uuid/uuid.h @@ -54,7 +54,7 @@ typedef unsigned char uuid_t[16]; /* 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} diff --git a/editors/awk.c b/editors/awk.c index aac40aa..2af3988 100644 --- a/editors/awk.c +++ b/editors/awk.c @@ -499,7 +499,7 @@ static void chain_group(void); static var *evaluate(node *, var *); static rstream *next_input_file(void); static int fmt_num(char *, int, const char *, double, int); -static int awk_exit(int) ATTRIBUTE_NORETURN; +static int awk_exit(int) NORETURN; /* ---- error handling ---- */ @@ -521,7 +521,7 @@ static void zero_out_var(var * vp) memset(vp, 0, sizeof(*vp)); } -static void syntax_error(const char *const message) ATTRIBUTE_NORETURN; +static void syntax_error(const char *const message) NORETURN; static void syntax_error(const char *const message) { bb_error_msg_and_die("%s:%i: %s", g_progname, g_lineno, message); diff --git a/editors/cmp.c b/editors/cmp.c index b211adf..2e98e6e 100644 --- a/editors/cmp.c +++ b/editors/cmp.c @@ -33,7 +33,7 @@ static const char opt_chars[] ALIGN1 = "sl"; #define CMP_OPT_l (1<<1) int cmp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int cmp_main(int argc ATTRIBUTE_UNUSED, char **argv) +int cmp_main(int argc UNUSED_PARAM, char **argv) { FILE *fp1, *fp2, *outfile = stdout; const char *filename1, *filename2 = "-"; diff --git a/editors/diff.c b/editors/diff.c index d7eccfb..570c4c4 100644 --- a/editors/diff.c +++ b/editors/diff.c @@ -1164,9 +1164,9 @@ static void do_diff(char *dir1, char *path1, char *dir2, char *path2) #if ENABLE_FEATURE_DIFF_DIR /* This function adds a filename to dl, the directory listing. */ static int FAST_FUNC add_to_dirlist(const char *filename, - struct stat *sb ATTRIBUTE_UNUSED, + struct stat *sb UNUSED_PARAM, void *userdata, - int depth ATTRIBUTE_UNUSED) + int depth UNUSED_PARAM) { /* +2: with space for eventual trailing NULL */ dl = xrealloc(dl, (dl_count+2) * sizeof(dl[0])); @@ -1271,7 +1271,7 @@ static void diffdir(char *p1, char *p2) int diff_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int diff_main(int argc ATTRIBUTE_UNUSED, char **argv) +int diff_main(int argc UNUSED_PARAM, char **argv) { int gotstdin = 0; char *f1, *f2; diff --git a/editors/ed.c b/editors/ed.c index 0961cc3..9084a17 100644 --- a/editors/ed.c +++ b/editors/ed.c @@ -89,7 +89,7 @@ static char *skip_blank(const char *cp) int ed_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int ed_main(int argc ATTRIBUTE_UNUSED, char **argv) +int ed_main(int argc UNUSED_PARAM, char **argv) { INIT_G(); diff --git a/editors/patch.c b/editors/patch.c index 2bc594d..d5f6df2 100644 --- a/editors/patch.c +++ b/editors/patch.c @@ -66,7 +66,7 @@ static char *extract_filename(char *line, int patch_level, const char *pat) } 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; diff --git a/editors/sed.c b/editors/sed.c index 81cc195..88bae78 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -1233,7 +1233,7 @@ static void add_cmd_block(char *cmdstr) } int sed_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int sed_main(int argc ATTRIBUTE_UNUSED, char **argv) +int sed_main(int argc UNUSED_PARAM, char **argv) { enum { OPT_in_place = 1 << 0, diff --git a/editors/vi.c b/editors/vi.c index 81baa89..1f1d3ca 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -2141,7 +2141,7 @@ static void cookmode(void) //----- Come here when we get a window resize signal --------- #if ENABLE_FEATURE_VI_USE_SIGNALS -static void winch_sig(int sig ATTRIBUTE_UNUSED) +static void winch_sig(int sig UNUSED_PARAM) { // FIXME: do it in main loop!!! signal(SIGWINCH, winch_sig); @@ -2155,7 +2155,7 @@ static void winch_sig(int sig ATTRIBUTE_UNUSED) } //----- Come here when we get a continue signal ------------------- -static void cont_sig(int sig ATTRIBUTE_UNUSED) +static void cont_sig(int sig UNUSED_PARAM) { rawmode(); // terminal to "raw" last_status_cksum = 0; // force status update @@ -2167,7 +2167,7 @@ static void cont_sig(int sig ATTRIBUTE_UNUSED) } //----- Come here when we get a Suspend signal ------------------- -static void suspend_sig(int sig ATTRIBUTE_UNUSED) +static void suspend_sig(int sig UNUSED_PARAM) { place_cursor(rows - 1, 0, FALSE); // go to bottom of screen clear_to_eol(); // Erase to end of line diff --git a/findutils/find.c b/findutils/find.c index 51d26c0..f2b8974 100644 --- a/findutils/find.c +++ b/findutils/find.c @@ -74,9 +74,9 @@ typedef struct { #endif } action; #define ACTS(name, arg...) typedef struct { action a; arg; } action_##name; -#define ACTF(name) static int func_##name(const char *fileName ATTRIBUTE_UNUSED, \ - struct stat *statbuf ATTRIBUTE_UNUSED, \ - action_##name* ap ATTRIBUTE_UNUSED) +#define ACTF(name) static int func_##name(const char *fileName UNUSED_PARAM, \ + struct stat *statbuf UNUSED_PARAM, \ + action_##name* ap UNUSED_PARAM) ACTS(print) ACTS(name, const char *pattern; bool iname;) USE_FEATURE_FIND_PATH( ACTS(path, const char *pattern;)) @@ -376,8 +376,8 @@ ACTF(context) static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf, - void *userData SKIP_FEATURE_FIND_MAXDEPTH(ATTRIBUTE_UNUSED), - int depth SKIP_FEATURE_FIND_MAXDEPTH(ATTRIBUTE_UNUSED)) + void *userData SKIP_FEATURE_FIND_MAXDEPTH(UNUSED_PARAM), + int depth SKIP_FEATURE_FIND_MAXDEPTH(UNUSED_PARAM)) { int i; #if ENABLE_FEATURE_FIND_MAXDEPTH diff --git a/findutils/grep.c b/findutils/grep.c index 8d18f43..5cfd772 100644 --- a/findutils/grep.c +++ b/findutils/grep.c @@ -371,9 +371,9 @@ static void load_regexes_from_file(llist_t *fopt) } static int FAST_FUNC file_action_grep(const char *filename, - struct stat *statbuf ATTRIBUTE_UNUSED, + struct stat *statbuf UNUSED_PARAM, void* matched, - int depth ATTRIBUTE_UNUSED) + int depth UNUSED_PARAM) { FILE *file = fopen(filename, "r"); if (file == NULL) { diff --git a/findutils/xargs.c b/findutils/xargs.c index 3322e9e..7a9865b 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c @@ -292,7 +292,7 @@ static int xargs_ask_confirmation(void) #if ENABLE_FEATURE_XARGS_SUPPORT_ZERO_TERM static xlist_t *process0_stdin(xlist_t *list_arg, - const char *eof_str ATTRIBUTE_UNUSED, size_t mc, char *buf) + const char *eof_str UNUSED_PARAM, size_t mc, char *buf) { int c; /* current char */ char *s = NULL; /* start word */ diff --git a/include/libbb.h b/include/libbb.h index 54601f8..378cb44 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -295,7 +295,7 @@ extern off_t bb_copyfd_size(int fd1, int fd2, off_t size) FAST_FUNC; extern void bb_copyfd_exact_size(int fd1, int fd2, off_t size) FAST_FUNC; /* "short" copy can be detected by return value < size */ /* this helper yells "short read!" if param is not -1 */ -extern void complain_copyfd_and_die(off_t sz) ATTRIBUTE_NORETURN FAST_FUNC; +extern void complain_copyfd_and_die(off_t sz) NORETURN FAST_FUNC; extern char bb_process_escape_sequence(const char **ptr) FAST_FUNC; /* xxxx_strip version can modify its parameter: * "/" -> "/" @@ -365,7 +365,7 @@ void signal_no_SA_RESTART_empty_mask(int sig, void (*handler)(int)) FAST_FUNC; /* syscalls like read() won't be interrupted (though select/poll will be): */ void signal_SA_RESTART_empty_mask(int sig, void (*handler)(int)) FAST_FUNC; void wait_for_any_sig(void) FAST_FUNC; -void kill_myself_with_sig(int sig) ATTRIBUTE_NORETURN FAST_FUNC; +void kill_myself_with_sig(int sig) NORETURN FAST_FUNC; void sig_block(int sig) FAST_FUNC; void sig_unblock(int sig) FAST_FUNC; /* Will do sigaction(signum, act, NULL): */ @@ -611,7 +611,7 @@ extern char *bb_get_chunk_from_file(FILE *file, int *end) FAST_FUNC; extern void die_if_ferror(FILE *file, const char *msg) FAST_FUNC; extern void die_if_ferror_stdout(void) FAST_FUNC; extern void xfflush_stdout(void) FAST_FUNC; -extern void fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN FAST_FUNC; +extern void fflush_stdout_and_exit(int retval) NORETURN FAST_FUNC; extern int fclose_if_not_stdin(FILE *file) FAST_FUNC; extern FILE *xfopen(const char *filename, const char *mode) FAST_FUNC; /* Prints warning to stderr and returns NULL on failure: */ @@ -789,7 +789,7 @@ enum { # define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags) # define bb_daemonize(flags) bb_daemonize_or_rexec(flags, bogus) #else - void re_exec(char **argv) ATTRIBUTE_NORETURN FAST_FUNC; + void re_exec(char **argv) NORETURN FAST_FUNC; void forkexit_or_rexec(char **argv) FAST_FUNC; extern bool re_execed; int BUG_fork_is_unavailable_on_nommu(void) FAST_FUNC; @@ -855,8 +855,8 @@ extern smallint logmode; extern int die_sleep; extern int xfunc_error_retval; extern jmp_buf die_jmp; -extern void xfunc_die(void) ATTRIBUTE_NORETURN FAST_FUNC; -extern void bb_show_usage(void) ATTRIBUTE_NORETURN FAST_FUNC; +extern void xfunc_die(void) NORETURN FAST_FUNC; +extern void bb_show_usage(void) NORETURN FAST_FUNC; extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; extern void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; @@ -865,7 +865,7 @@ extern void bb_perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, extern void bb_simple_perror_msg_and_die(const char *s) __attribute__ ((noreturn)) FAST_FUNC; extern void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; extern void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; -extern void bb_perror_nomsg_and_die(void) ATTRIBUTE_NORETURN FAST_FUNC; +extern void bb_perror_nomsg_and_die(void) NORETURN FAST_FUNC; extern void bb_perror_nomsg(void) FAST_FUNC; extern void bb_info_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; extern void bb_verror_msg(const char *s, va_list p, const char *strerr) FAST_FUNC; @@ -947,7 +947,7 @@ const struct hwtype *get_hwntype(int type) FAST_FUNC; extern int find_applet_by_name(const char *name) FAST_FUNC; /* Returns only if applet is not found. */ extern void run_applet_and_exit(const char *name, char **argv) FAST_FUNC; -extern void run_applet_no_and_exit(int a, char **argv) ATTRIBUTE_NORETURN FAST_FUNC; +extern void run_applet_no_and_exit(int a, char **argv) NORETURN FAST_FUNC; #endif #ifdef HAVE_MNTENT_H @@ -1001,7 +1001,7 @@ char *bb_simplify_path(const char *path) FAST_FUNC; #define FAIL_DELAY 3 extern void bb_do_delay(int seconds) FAST_FUNC; extern void change_identity(const struct passwd *pw) FAST_FUNC; -extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) ATTRIBUTE_NORETURN FAST_FUNC; +extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) NORETURN FAST_FUNC; extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) FAST_FUNC; #if ENABLE_SELINUX extern void renew_current_security_context(void) FAST_FUNC; diff --git a/include/platform.h b/include/platform.h index 12cb4d5..d2c1f9d 100644 --- a/include/platform.h +++ b/include/platform.h @@ -48,27 +48,27 @@ # define __const const #endif -#define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) -#define ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m))) +#define UNUSED_PARAM __attribute__ ((__unused__)) +#define NORETURN __attribute__ ((__noreturn__)) +#define PACKED __attribute__ ((__packed__)) +#define ALIGNED(m) __attribute__ ((__aligned__(m))) /* __NO_INLINE__: some gcc's do not honor inlining! :( */ #if __GNUC_PREREQ(3,0) && !defined(__NO_INLINE__) # define ALWAYS_INLINE __attribute__ ((always_inline)) inline /* I've seen a toolchain where I needed __noinline__ instead of noinline */ # define NOINLINE __attribute__((__noinline__)) # if !ENABLE_WERROR -# define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -# define ATTRIBUTE_UNUSED_RESULT __attribute__ ((warn_unused_result)) +# define DEPRECATED __attribute__ ((__deprecated__)) +# define UNUSED_PARAM_RESULT __attribute__ ((warn_unused_result)) # else -# define ATTRIBUTE_DEPRECATED /* n/a */ -# define ATTRIBUTE_UNUSED_RESULT /* n/a */ +# define DEPRECATED /* n/a */ +# define UNUSED_PARAM_RESULT /* n/a */ # endif #else # define ALWAYS_INLINE inline /* n/a */ # define NOINLINE /* n/a */ -# define ATTRIBUTE_DEPRECATED /* n/a */ -# define ATTRIBUTE_UNUSED_RESULT /* n/a */ +# define DEPRECATED /* n/a */ +# define UNUSED_PARAM_RESULT /* n/a */ #endif /* -fwhole-program makes all symbols local. The attribute externally_visible diff --git a/init/halt.c b/init/halt.c index 4fac3a8..207069e 100644 --- a/init/halt.c +++ b/init/halt.c @@ -16,7 +16,7 @@ #endif int halt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int halt_main(int argc ATTRIBUTE_UNUSED, char **argv) +int halt_main(int argc UNUSED_PARAM, char **argv) { static const int magic[] = { #ifdef RB_HALT_SYSTEM diff --git a/init/init.c b/init/init.c index e399389..2328967 100644 --- a/init/init.c +++ b/init/init.c @@ -96,7 +96,7 @@ static const char *const environment[] = { /* Function prototypes */ static void delete_init_action(struct init_action *a); -static void halt_reboot_pwoff(int sig) ATTRIBUTE_NORETURN; +static void halt_reboot_pwoff(int sig) NORETURN; static void waitfor(pid_t pid) { @@ -110,7 +110,7 @@ static void waitfor(pid_t pid) continue; } -static void loop_forever(void) ATTRIBUTE_NORETURN; +static void loop_forever(void) NORETURN; static void loop_forever(void) { while (1) @@ -594,7 +594,7 @@ static void halt_reboot_pwoff(int sig) /* Handler for QUIT - exec "restart" action, * else (no such action defined) do nothing */ -static void exec_restart_action(int sig ATTRIBUTE_UNUSED) +static void exec_restart_action(int sig UNUSED_PARAM) { struct init_action *a; @@ -617,13 +617,13 @@ static void exec_restart_action(int sig ATTRIBUTE_UNUSED) } } -static void ctrlaltdel_signal(int sig ATTRIBUTE_UNUSED) +static void ctrlaltdel_signal(int sig UNUSED_PARAM) { run_actions(CTRLALTDEL); } /* The SIGSTOP & SIGTSTP handler */ -static void stop_handler(int sig ATTRIBUTE_UNUSED) +static void stop_handler(int sig UNUSED_PARAM) { int saved_errno = errno; @@ -635,7 +635,7 @@ static void stop_handler(int sig ATTRIBUTE_UNUSED) } /* The SIGCONT handler */ -static void cont_handler(int sig ATTRIBUTE_UNUSED) +static void cont_handler(int sig UNUSED_PARAM) { got_cont = 1; } @@ -790,7 +790,7 @@ static void parse_inittab(void) } #if ENABLE_FEATURE_USE_INITTAB -static void reload_signal(int sig ATTRIBUTE_UNUSED) +static void reload_signal(int sig UNUSED_PARAM) { struct init_action *a, *tmp; @@ -838,7 +838,7 @@ static void reload_signal(int sig ATTRIBUTE_UNUSED) #endif int init_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int init_main(int argc ATTRIBUTE_UNUSED, char **argv) +int init_main(int argc UNUSED_PARAM, char **argv) { struct init_action *a; pid_t wpid; diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 0017a4b..eb98f1c 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c @@ -738,7 +738,7 @@ void FAST_FUNC run_applet_and_exit(const char *name, char **argv) #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) diff --git a/libbb/bb_askpass.c b/libbb/bb_askpass.c index ca18ade..fba82a0 100644 --- a/libbb/bb_askpass.c +++ b/libbb/bb_askpass.c @@ -13,7 +13,7 @@ #include "libbb.h" /* do nothing signal handler */ -static void askpass_timeout(int ATTRIBUTE_UNUSED ignore) +static void askpass_timeout(int UNUSED_PARAM ignore) { } diff --git a/libbb/messages.c b/libbb/messages.c index 74a070c..9009028 100644 --- a/libbb/messages.c +++ b/libbb/messages.c @@ -70,4 +70,4 @@ const char bb_path_wtmp_file[] ALIGN1 = /* We use it for "global" data via *(struct global*)&bb_common_bufsiz1. * Since gcc insists on aligning struct global's members, it would be a pity * (and an alignment fault on some CPUs) to mess it up. */ -char bb_common_bufsiz1[COMMON_BUFSIZE] __attribute__(( aligned(sizeof(long long)) )); +char bb_common_bufsiz1[COMMON_BUFSIZE] ALIGNED(sizeof(long long)); diff --git a/libbb/recursive_action.c b/libbb/recursive_action.c index dbc31c3..07bd0ab 100644 --- a/libbb/recursive_action.c +++ b/libbb/recursive_action.c @@ -22,10 +22,10 @@ * is so stinking huge. */ -static int FAST_FUNC true_action(const char *fileName ATTRIBUTE_UNUSED, - struct stat *statbuf ATTRIBUTE_UNUSED, - void* userData ATTRIBUTE_UNUSED, - int depth ATTRIBUTE_UNUSED) +static int FAST_FUNC true_action(const char *fileName UNUSED_PARAM, + struct stat *statbuf UNUSED_PARAM, + void* userData UNUSED_PARAM, + int depth UNUSED_PARAM) { return TRUE; } diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c index 863ccdf..89414d7 100644 --- a/loginutils/addgroup.c +++ b/loginutils/addgroup.c @@ -123,7 +123,7 @@ static void add_user_to_group(char **args, * will add an existing user to an existing group. */ int addgroup_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int addgroup_main(int argc ATTRIBUTE_UNUSED, char **argv) +int addgroup_main(int argc UNUSED_PARAM, char **argv) { char *group; gid_t gid = 0; diff --git a/loginutils/adduser.c b/loginutils/adduser.c index cd68015..3154806 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c @@ -56,7 +56,7 @@ static void addgroup_wrapper(struct passwd *p) free(cmd); } -static void passwd_wrapper(const char *login) ATTRIBUTE_NORETURN; +static void passwd_wrapper(const char *login) NORETURN; static void passwd_wrapper(const char *login) { @@ -85,7 +85,7 @@ static const char adduser_longopts[] ALIGN1 = * can be customized via command-line parameters. */ int adduser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int adduser_main(int argc ATTRIBUTE_UNUSED, char **argv) +int adduser_main(int argc UNUSED_PARAM, char **argv) { struct passwd pw; const char *usegroup = NULL; diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c index 7308596..25145fd 100644 --- a/loginutils/chpasswd.c +++ b/loginutils/chpasswd.c @@ -19,7 +19,7 @@ static const char chpasswd_longopts[] ALIGN1 = #define OPT_MD5 2 int chpasswd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int chpasswd_main(int argc ATTRIBUTE_UNUSED, char **argv) +int chpasswd_main(int argc UNUSED_PARAM, char **argv) { char *name, *pass; char salt[sizeof("$N$XXXXXXXX")]; diff --git a/loginutils/cryptpw.c b/loginutils/cryptpw.c index 901f6fc..db5d959 100644 --- a/loginutils/cryptpw.c +++ b/loginutils/cryptpw.c @@ -32,7 +32,7 @@ done */ int cryptpw_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int cryptpw_main(int argc ATTRIBUTE_UNUSED, char **argv) +int cryptpw_main(int argc UNUSED_PARAM, char **argv) { char salt[sizeof("$N$XXXXXXXX")]; char *opt_a; diff --git a/loginutils/getty.c b/loginutils/getty.c index 13a8c0c..7d4fe4d 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c @@ -620,7 +620,7 @@ static void update_utmp(const char *line, char *fakehost) #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 */ diff --git a/loginutils/login.c b/loginutils/login.c index d9a2f8a..9c7941e 100644 --- a/loginutils/login.c +++ b/loginutils/login.c @@ -206,7 +206,7 @@ static void motd(void) } } -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. @@ -221,7 +221,7 @@ static void alarm_handler(int sig ATTRIBUTE_UNUSED) } 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), diff --git a/loginutils/passwd.c b/loginutils/passwd.c index 0a31137..84e5aeb 100644 --- a/loginutils/passwd.c +++ b/loginutils/passwd.c @@ -71,7 +71,7 @@ static char* new_password(const struct passwd *pw, uid_t myuid, int algo) } 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 */ diff --git a/loginutils/su.c b/loginutils/su.c index 1a35f0e..61039d8 100644 --- a/loginutils/su.c +++ b/loginutils/su.c @@ -12,7 +12,7 @@ #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; diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index 38812a6..bfd4256 100644 --- a/loginutils/sulogin.c +++ b/loginutils/sulogin.c @@ -8,14 +8,14 @@ #include "libbb.h" #include -//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; diff --git a/loginutils/vlock.c b/loginutils/vlock.c index 3ce40dd..442272a 100644 --- a/loginutils/vlock.c +++ b/loginutils/vlock.c @@ -18,21 +18,21 @@ #include #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; diff --git a/miscutils/bbconfig.c b/miscutils/bbconfig.c index f3aef42..689052e 100644 --- a/miscutils/bbconfig.c +++ b/miscutils/bbconfig.c @@ -5,7 +5,7 @@ #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; diff --git a/miscutils/chat.c b/miscutils/chat.c index 5bbbb68..d550c7c 100644 --- a/miscutils/chat.c +++ b/miscutils/chat.c @@ -41,7 +41,7 @@ enum { 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; @@ -103,7 +103,7 @@ static size_t unescape(char *s, int *nocr) 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 diff --git a/miscutils/chrt.c b/miscutils/chrt.c index a0f684b..23ef58c 100644 --- a/miscutils/chrt.c +++ b/miscutils/chrt.c @@ -41,7 +41,7 @@ static void show_min_max(int pol) #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; diff --git a/miscutils/crond.c b/miscutils/crond.c index ecb3a2f..e48abf9 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c @@ -159,7 +159,7 @@ static void crondlog(const char *ctl, ...) } 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; diff --git a/miscutils/crontab.c b/miscutils/crontab.c index dc3179d..64ea4e6 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c @@ -85,7 +85,7 @@ static int open_as_user(const struct passwd *pas, const char *file) } 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; diff --git a/miscutils/dc.c b/miscutils/dc.c index bd93ef6..47ec060 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c @@ -193,7 +193,7 @@ static char *get_token(char **buffer) } 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(); diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index ffc595a..c85ff08 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c @@ -741,7 +741,7 @@ static void action_permissions(const struct devfsd_notify_struct *info, } /* 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. The devfs change. The config file entry. diff --git a/miscutils/eject.c b/miscutils/eject.c index aa22a3a..ff3976e 100644 --- a/miscutils/eject.c +++ b/miscutils/eject.c @@ -83,7 +83,7 @@ static void eject_cdrom(unsigned flags, const char *dev) } 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; diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c index 07350b0..67847c1 100644 --- a/miscutils/fbsplash.c +++ b/miscutils/fbsplash.c @@ -355,7 +355,7 @@ static void init(const char *cfg_filename) 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 diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index a5d5b05..b75da16 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c @@ -678,7 +678,7 @@ static const char secu_str[] ALIGN1 = ; // 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; @@ -1908,7 +1908,7 @@ static int fromhex(unsigned char c) 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]; diff --git a/miscutils/inotifyd.c b/miscutils/inotifyd.c index 0d7ad2a..2a1a153 100644 --- a/miscutils/inotifyd.c +++ b/miscutils/inotifyd.c @@ -56,7 +56,7 @@ extern int inotify_init(void); 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; diff --git a/miscutils/last.c b/miscutils/last.c index 612f504..8c8192b 100644 --- a/miscutils/last.c +++ b/miscutils/last.c @@ -35,7 +35,7 @@ #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; diff --git a/miscutils/last_fancy.c b/miscutils/last_fancy.c index 2b7fee6..8e63e5c 100644 --- a/miscutils/last_fancy.c +++ b/miscutils/last_fancy.c @@ -148,7 +148,7 @@ static int is_runlevel_shutdown(struct utmp *ut) } 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; diff --git a/miscutils/man.c b/miscutils/man.c index 95cb679..3685be7 100644 --- a/miscutils/man.c +++ b/miscutils/man.c @@ -73,7 +73,7 @@ static int show_manpage(const char *pager, char *man_filename, int man) } 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; diff --git a/miscutils/microcom.c b/miscutils/microcom.c index 1608960..ac3e551 100644 --- a/miscutils/microcom.c +++ b/miscutils/microcom.c @@ -41,7 +41,7 @@ static int xset1(int fd, struct termios *tio, const char *device) } 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; diff --git a/miscutils/mt.c b/miscutils/mt.c index c56a8e0..586373d 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c @@ -81,7 +81,7 @@ static const char opcode_name[] ALIGN1 = "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; diff --git a/miscutils/rx.c b/miscutils/rx.c index 48867b8..94eb452 100644 --- a/miscutils/rx.c +++ b/miscutils/rx.c @@ -213,7 +213,7 @@ static int receive(/*int read_fd, */int file_fd) } /* for (;;) */ } -static void sigalrm_handler(int ATTRIBUTE_UNUSED signum) +static void sigalrm_handler(int UNUSED_PARAM signum) { } diff --git a/miscutils/setsid.c b/miscutils/setsid.c index 014de51..127adf6 100644 --- a/miscutils/setsid.c +++ b/miscutils/setsid.c @@ -17,7 +17,7 @@ #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(); diff --git a/miscutils/strings.c b/miscutils/strings.c index 1474137..3e02b53 100644 --- a/miscutils/strings.c +++ b/miscutils/strings.c @@ -15,7 +15,7 @@ #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; diff --git a/miscutils/taskset.c b/miscutils/taskset.c index 708abd9..3175af1 100644 --- a/miscutils/taskset.c +++ b/miscutils/taskset.c @@ -40,7 +40,7 @@ static char *__from_cpuset(cpu_set_t *mask) 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; diff --git a/miscutils/time.c b/miscutils/time.c index cce7d5b..d8b8aa0 100644 --- a/miscutils/time.c +++ b/miscutils/time.c @@ -396,7 +396,7 @@ static void run_command(char *const *cmd, resource_t *resp) } 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; diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index 4ad21cb..9b1a110 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c @@ -13,7 +13,7 @@ #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'; diff --git a/modutils/depmod.c b/modutils/depmod.c index 4fba537..d128ac0 100644 --- a/modutils/depmod.c +++ b/modutils/depmod.c @@ -48,7 +48,7 @@ static char* find_keyword(void *the_module, size_t len, const char * const word) 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; @@ -110,7 +110,7 @@ static int FAST_FUNC fileAction(const char *fname, struct stat *sb, } 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" */ diff --git a/modutils/insmod.c b/modutils/insmod.c index 8217629..d928be2 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c @@ -792,8 +792,8 @@ static char *m_fullName; 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; @@ -3306,7 +3306,7 @@ static int obj_create_image(struct obj_file *f, char *image) /*======================================================================*/ -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; @@ -4211,9 +4211,9 @@ static const char *moderror(int err) #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; diff --git a/modutils/lsmod.c b/modutils/lsmod.c index a2330fe..5e37923 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c @@ -75,7 +75,7 @@ enum { }; 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; @@ -143,7 +143,7 @@ int lsmod_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) #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"); diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index bbcd989..6131d42 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c @@ -301,9 +301,9 @@ static char* pathname_2_modname(const char *pathname) } 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; @@ -581,7 +581,7 @@ Options: */ 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]; diff --git a/networking/arp.c b/networking/arp.c index ae1bb1a..ac8c870 100644 --- a/networking/arp.c +++ b/networking/arp.c @@ -441,7 +441,7 @@ static int arp_show(char *name) } 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; diff --git a/networking/arping.c b/networking/arping.c index 0a444f1..aba32b8 100644 --- a/networking/arping.c +++ b/networking/arping.c @@ -107,7 +107,7 @@ static int send_pack(struct in_addr *src_addr, return err; } -static void finish(void) ATTRIBUTE_NORETURN; +static void finish(void) NORETURN; static void finish(void) { if (!(option_mask32 & QUIET)) { @@ -245,7 +245,7 @@ static bool recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM) } 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; diff --git a/networking/brctl.c b/networking/brctl.c index acc7897..102776e 100644 --- a/networking/brctl.c +++ b/networking/brctl.c @@ -81,7 +81,7 @@ static void arm_ioctl(unsigned long *args, 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" diff --git a/networking/dnsd.c b/networking/dnsd.c index bd0fad4..8512f0c 100644 --- a/networking/dnsd.c +++ b/networking/dnsd.c @@ -327,7 +327,7 @@ static void interrupt(int sig) } 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; diff --git a/networking/ether-wake.c b/networking/ether-wake.c index fcd7dd2..a37b6eb 100644 --- a/networking/ether-wake.c +++ b/networking/ether-wake.c @@ -179,7 +179,7 @@ static int get_wol_pw(const char *ethoptarg, unsigned char *wol_passwd) } 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; diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index f732d02..d39b73e 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c @@ -39,7 +39,7 @@ struct BUG_G_too_big { #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 */ @@ -276,7 +276,7 @@ static const char ftpgetput_longopts[] ALIGN1 = #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"; diff --git a/networking/httpd.c b/networking/httpd.c index 9b4b717..30ef305 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -338,7 +338,7 @@ enum { 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) { @@ -919,7 +919,7 @@ static int openServer(void) /* * 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 @@ -1050,7 +1050,7 @@ static void send_headers(int responseNum) } } -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); @@ -1094,7 +1094,7 @@ static int get_line(void) #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[] */ @@ -1292,7 +1292,7 @@ static void send_cgi_and_exit( 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, @@ -1752,8 +1752,8 @@ static Htaccess_Proxy *find_proxy_entry(const char *url) /* * 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); } @@ -1761,7 +1761,7 @@ static void exit_on_signal(int sig ATTRIBUTE_UNUSED) /* * 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"; @@ -2151,7 +2151,7 @@ static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr) * 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(). @@ -2190,7 +2190,7 @@ static void mini_httpd(int server_socket) /* 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]; @@ -2241,7 +2241,7 @@ static void mini_httpd_nommu(int server_socket, int argc, char **argv) * 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; @@ -2289,7 +2289,7 @@ enum { 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; diff --git a/networking/ifenslave.c b/networking/ifenslave.c index 4c7eadc..13a32ef 100644 --- a/networking/ifenslave.c +++ b/networking/ifenslave.c @@ -446,7 +446,7 @@ static NOINLINE void get_drv_info(char *master_ifname) } 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; diff --git a/networking/ifupdown.c b/networking/ifupdown.c index c123918..af7bb6e 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c @@ -512,8 +512,8 @@ static int dhcp_up(struct interface_defn_t *ifd, execfn *exec) 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 */ } @@ -537,14 +537,14 @@ static int dhcp_down(struct interface_defn_t *ifd, execfn *exec) "`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; } diff --git a/networking/inetd.c b/networking/inetd.c index 08c0995..5f35271 100644 --- a/networking/inetd.c +++ b/networking/inetd.c @@ -887,7 +887,7 @@ static int same_serv_addr_proto(servtab_t *old, servtab_t *new) 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; @@ -1057,7 +1057,7 @@ static void reread_config_file(int sig ATTRIBUTE_UNUSED) restore_sigmask(&omask); } -static void reap_child(int sig ATTRIBUTE_UNUSED) +static void reap_child(int sig UNUSED_PARAM) { pid_t pid; int status; @@ -1084,7 +1084,7 @@ static void reap_child(int sig ATTRIBUTE_UNUSED) errno = save_errno; } -static void retry_network_setup(int sig ATTRIBUTE_UNUSED) +static void retry_network_setup(int sig UNUSED_PARAM) { servtab_t *sep; @@ -1100,7 +1100,7 @@ static void retry_network_setup(int sig ATTRIBUTE_UNUSED) } } -static void clean_up_and_exit(int sig ATTRIBUTE_UNUSED) +static void clean_up_and_exit(int sig UNUSED_PARAM) { servtab_t *sep; @@ -1128,7 +1128,7 @@ static void clean_up_and_exit(int sig ATTRIBUTE_UNUSED) } 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; @@ -1423,7 +1423,7 @@ static const char *const cat_args[] = { "cat", NULL }; #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) { @@ -1464,7 +1464,7 @@ static void echo_dg(int s, servtab_t *sep) #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) @@ -1483,7 +1483,7 @@ static void discard_stream(int s, servtab_t *sep ATTRIBUTE_UNUSED) #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); @@ -1504,7 +1504,7 @@ static void init_ring(void) } /* 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; @@ -1581,7 +1581,7 @@ static uint32_t machtime(void) 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; @@ -1606,7 +1606,7 @@ static void machtime_dg(int s, servtab_t *sep) #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; diff --git a/networking/interface.c b/networking/interface.c index afc7d0b..83b24f1 100644 --- a/networking/interface.c +++ b/networking/interface.c @@ -244,7 +244,7 @@ static char* FAST_FUNC UNSPEC_print(unsigned char *ptr) } /* 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]"; diff --git a/networking/ip.c b/networking/ip.c index 5249217..7dcddfd 100644 --- a/networking/ip.c +++ b/networking/ip.c @@ -24,7 +24,7 @@ || 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(); } @@ -37,35 +37,35 @@ static int ip_do(int (*ip_func)(char **argv), char **argv) #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); } @@ -73,7 +73,7 @@ int iptunnel_main(int argc ATTRIBUTE_UNUSED, char **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") diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c index 3e05632..e08ebd4 100644 --- a/networking/isrv_identd.c +++ b/networking/isrv_identd.c @@ -76,7 +76,7 @@ static int do_rd(int fd, void **paramp) return retval; } -static int do_timeout(void **paramp ATTRIBUTE_UNUSED) +static int do_timeout(void **paramp UNUSED_PARAM) { return 1; /* terminate session */ } @@ -93,7 +93,7 @@ static void inetd_mode(void) } 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, diff --git a/networking/libiproute/ip_common.h b/networking/libiproute/ip_common.h index 346d0b9..305b491 100644 --- a/networking/libiproute/ip_common.h +++ b/networking/libiproute/ip_common.h @@ -21,7 +21,7 @@ extern char **ip_parse_common_args(char **argv); 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); diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index 7a948a1..288dcca 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c @@ -196,8 +196,8 @@ static int flush_update(void) 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; diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index 5aad6ed..3b212ee 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c @@ -154,7 +154,7 @@ static void set_address(struct ifreq *ifr, int brd) } -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); diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index 07a88c4..17af41f 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c @@ -78,8 +78,8 @@ static unsigned get_hz(void) 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; diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c index 2ee7701..f926078 100644 --- a/networking/libiproute/iprule.c +++ b/networking/libiproute/iprule.c @@ -40,8 +40,8 @@ static void usage(void) } */ -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; diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c index f9b6970..eeae4e2 100644 --- a/networking/libiproute/ll_map.c +++ b/networking/libiproute/ll_map.c @@ -39,9 +39,9 @@ static struct idxmap *find_by_index(int idx) 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); diff --git a/networking/libiproute/utils.c b/networking/libiproute/utils.c index e63bb27..706710e 100644 --- a/networking/libiproute/utils.c +++ b/networking/libiproute/utils.c @@ -279,7 +279,7 @@ int inet_addr_match(inet_prefix * a, inet_prefix * b, int bits) 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) { diff --git a/networking/libiproute/utils.h b/networking/libiproute/utils.h index 06b1f04..607083a 100644 --- a/networking/libiproute/utils.h +++ b/networking/libiproute/utils.h @@ -28,7 +28,7 @@ extern char _SL_; #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) @@ -76,9 +76,9 @@ extern int get_s8(int8_t *val, char *arg, int base); 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); diff --git a/networking/nc.c b/networking/nc.c index 2fd42d5..1a99f91 100644 --- a/networking/nc.c +++ b/networking/nc.c @@ -17,7 +17,7 @@ * 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"); } diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c index 5f7bd03..41db945 100644 --- a/networking/nc_bloaty.c +++ b/networking/nc_bloaty.c @@ -177,7 +177,7 @@ static void unarm(void) } /* timeout and other signal handling cruft */ -static void tmtravel(int sig ATTRIBUTE_UNUSED) +static void tmtravel(int sig UNUSED_PARAM) { unarm(); longjmp(jbuf, 1); @@ -222,7 +222,7 @@ Debug("findline returning whole thing: %d", siz); 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); diff --git a/networking/netstat.c b/networking/netstat.c index fd8d8ec..24b2654 100644 --- a/networking/netstat.c +++ b/networking/netstat.c @@ -486,7 +486,7 @@ static void do_info(const char *file, const char *name, int (*proc)(int, char *) } 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; diff --git a/networking/ping.c b/networking/ping.c index 3ac9481..5def8c3 100644 --- a/networking/ping.c +++ b/networking/ping.c @@ -80,7 +80,7 @@ static int in_cksum(unsigned short *buf, int sz) 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); @@ -174,7 +174,7 @@ static void ping6(len_and_sockaddr *lsa) #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 @@ -302,8 +302,8 @@ void BUG_ping_globals_too_big(void); /**************************************************************************/ -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); @@ -366,7 +366,7 @@ static void sendping_tail(void (*sp)(int), const void *pkt, int size_pkt) } } -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() */ @@ -388,7 +388,7 @@ static void sendping4(int junk ATTRIBUTE_UNUSED) 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); @@ -714,7 +714,7 @@ static void ping(len_and_sockaddr *lsa) } 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; diff --git a/networking/pscan.c b/networking/pscan.c index b332d71..5fb6af0 100644 --- a/networking/pscan.c +++ b/networking/pscan.c @@ -31,7 +31,7 @@ static const char *port_name(unsigned port) #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 */ diff --git a/networking/route.c b/networking/route.c index 0146fa0..f467ed3 100644 --- a/networking/route.c +++ b/networking/route.c @@ -641,7 +641,7 @@ static const char tbl_verb[] ALIGN1 = ; 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; diff --git a/networking/sendmail.c b/networking/sendmail.c index b58055d..9361738 100644 --- a/networking/sendmail.c +++ b/networking/sendmail.c @@ -275,7 +275,7 @@ static char *parse_url(char *url, char **user, char **pass) } 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; diff --git a/networking/slattach.c b/networking/slattach.c index 02ecb5e..52f7f3c 100644 --- a/networking/slattach.c +++ b/networking/slattach.c @@ -64,7 +64,7 @@ static int set_termios_state_or_warn(struct termios *state) * 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; @@ -114,13 +114,13 @@ static void set_state(struct termios *state, int encap) } } -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 = diff --git a/networking/tcpudp.c b/networking/tcpudp.c index 561d132..29408c5 100644 --- a/networking/tcpudp.c +++ b/networking/tcpudp.c @@ -144,7 +144,7 @@ static void connection_status(void) 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; @@ -162,7 +162,7 @@ static void sig_child_handler(int sig ATTRIBUTE_UNUSED) } 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; diff --git a/networking/telnet.c b/networking/telnet.c index 3a06c16..aaaa264 100644 --- a/networking/telnet.c +++ b/networking/telnet.c @@ -101,7 +101,7 @@ static void iacflush(void) #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(); diff --git a/networking/telnetd.c b/networking/telnetd.c index 3660d78..22ecb3c 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c @@ -330,7 +330,7 @@ free_session(struct tsession *ts) #endif -static void handle_sigchld(int sig ATTRIBUTE_UNUSED) +static void handle_sigchld(int sig UNUSED_PARAM) { pid_t pid; struct tsession *ts; @@ -352,7 +352,7 @@ static void handle_sigchld(int sig ATTRIBUTE_UNUSED) } 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; diff --git a/networking/tftp.c b/networking/tftp.c index c61cde9..d09a6eb 100644 --- a/networking/tftp.c +++ b/networking/tftp.c @@ -555,7 +555,7 @@ static int tftp_protocol( #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; @@ -640,7 +640,7 @@ static len_and_sockaddr *get_sock_lsa(int s) } 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; diff --git a/networking/traceroute.c b/networking/traceroute.c index 6a53734..f16fc79 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c @@ -273,7 +273,7 @@ typedef struct outdata { 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 { diff --git a/networking/udhcp/arpping.c b/networking/udhcp/arpping.c index a8a4584..44815ad 100644 --- a/networking/udhcp/arpping.c +++ b/networking/udhcp/arpping.c @@ -30,7 +30,7 @@ struct arpMsg { 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 diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index bf0ecc7..0f3b796 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h @@ -43,13 +43,13 @@ struct dhcpMessage { 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 { diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index d2138dd..5caa00c 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c @@ -123,7 +123,7 @@ static uint8_t* alloc_dhcp_option(int code, const char *str, int extra) 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; diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index a6264ad..0cd6b9d 100644 --- a/networking/udhcp/dhcpd.c +++ b/networking/udhcp/dhcpd.c @@ -23,7 +23,7 @@ struct dhcpOfferedAddr *leases; 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; diff --git a/networking/udhcp/dhcprelay.c b/networking/udhcp/dhcprelay.c index 08fb733..90ecf48 100644 --- a/networking/udhcp/dhcprelay.c +++ b/networking/udhcp/dhcprelay.c @@ -236,7 +236,7 @@ static void pass_back(struct dhcpMessage *p, int packet_len, int *fds) } 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) { diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index c98005f..3e19390 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c @@ -7,7 +7,7 @@ #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; diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c index 58498f9..eaa50b8 100644 --- a/networking/udhcp/files.c +++ b/networking/udhcp/files.c @@ -155,7 +155,7 @@ static int read_opt(const char *const_line, void *arg) 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; diff --git a/networking/wget.c b/networking/wget.c index 8606b9b..d782cc4 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -188,7 +188,7 @@ static void progressmeter(int flag) */ #else /* FEATURE_WGET_STATUSBAR */ -static ALWAYS_INLINE void progressmeter(int flag ATTRIBUTE_UNUSED) { } +static ALWAYS_INLINE void progressmeter(int flag UNUSED_PARAM) { } #endif @@ -386,7 +386,7 @@ static char *gethdr(char *buf, size_t bufsiz, FILE *fp /*, int *istrunc*/) 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; diff --git a/networking/zcip.c b/networking/zcip.c index fccb1a4..221edd3 100644 --- a/networking/zcip.c +++ b/networking/zcip.c @@ -39,7 +39,7 @@ struct arp_packet { struct ether_header eth; struct ether_arp arp; -} ATTRIBUTE_PACKED; +} PACKED; enum { /* 169.254.0.0 */ diff --git a/printutils/lpd.c b/printutils/lpd.c index 11920d2..79119a4 100644 --- a/printutils/lpd.c +++ b/printutils/lpd.c @@ -95,7 +95,7 @@ static char *xmalloc_read_stdin(void) } 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; diff --git a/printutils/lpr.c b/printutils/lpr.c index d0bf587..4f3b024 100644 --- a/printutils/lpr.c +++ b/printutils/lpr.c @@ -42,7 +42,7 @@ static void get_response_or_say_and_die(int fd, const char *errmsg) } 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" diff --git a/procps/fuser.c b/procps/fuser.c index 55f7917..8afa958 100644 --- a/procps/fuser.c +++ b/procps/fuser.c @@ -269,7 +269,7 @@ static int kill_pid_list(pid_list *plist, int sig) } 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; diff --git a/procps/nmeter.c b/procps/nmeter.c index 205cb82..8cff0b9 100644 --- a/procps/nmeter.c +++ b/procps/nmeter.c @@ -274,7 +274,7 @@ typedef struct a { \ 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) { } @@ -293,7 +293,7 @@ static s_stat* init_delay(const char *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; @@ -435,7 +435,7 @@ static void collect_ctx(ctx_stat *s) 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; @@ -477,7 +477,7 @@ static void collect_blk(blk_stat *s) 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; @@ -490,7 +490,7 @@ S_STAT(fork_stat) 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]; @@ -657,7 +657,7 @@ static s_stat* init_mem(const char *param) 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]; @@ -670,7 +670,7 @@ static void collect_swp(swp_stat *s ATTRIBUTE_UNUSED) 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; @@ -681,7 +681,7 @@ static s_stat* init_swp(const char *param ATTRIBUTE_UNUSED) 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]; @@ -693,7 +693,7 @@ static void collect_fd(fd_stat *s ATTRIBUTE_UNUSED) 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; diff --git a/procps/pgrep.c b/procps/pgrep.c index 336fa84..7b3cd8e 100644 --- a/procps/pgrep.c +++ b/procps/pgrep.c @@ -43,7 +43,7 @@ static void act(unsigned pid, char *cmd, int signo, unsigned opt) } 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; diff --git a/procps/pidof.c b/procps/pidof.c index 8ed5a21..2519473 100644 --- a/procps/pidof.c +++ b/procps/pidof.c @@ -17,7 +17,7 @@ enum { }; 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; diff --git a/procps/ps.c b/procps/ps.c index cfca851..c5dff18 100644 --- a/procps/ps.c +++ b/procps/ps.c @@ -422,7 +422,7 @@ static void format_process(const procps_status_t *ps) } 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; @@ -483,7 +483,7 @@ int ps_main(int argc ATTRIBUTE_UNUSED, char **argv) 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; diff --git a/procps/renice.c b/procps/renice.c index d2dcf15..4c309e9 100644 --- a/procps/renice.c +++ b/procps/renice.c @@ -27,7 +27,7 @@ void BUG_bad_PRIO_PGRP(void); 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"; diff --git a/procps/sysctl.c b/procps/sysctl.c index 1995382..3607a23 100644 --- a/procps/sysctl.c +++ b/procps/sysctl.c @@ -57,7 +57,7 @@ enum { }; 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; diff --git a/procps/top.c b/procps/top.c index 0e1b333..e13cd15 100644 --- a/procps/top.c +++ b/procps/top.c @@ -519,7 +519,7 @@ static void reset_term(void) } } -static void sig_catcher(int sig ATTRIBUTE_UNUSED) +static void sig_catcher(int sig UNUSED_PARAM) { reset_term(); exit(EXIT_FAILURE); @@ -739,7 +739,7 @@ enum { }; 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; diff --git a/procps/uptime.c b/procps/uptime.c index b729055..d9aa1d0 100644 --- a/procps/uptime.c +++ b/procps/uptime.c @@ -26,7 +26,7 @@ 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; diff --git a/procps/watch.c b/procps/watch.c index 7d8e0de..5fd0510 100644 --- a/procps/watch.c +++ b/procps/watch.c @@ -24,7 +24,7 @@ // (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; diff --git a/runit/chpst.c b/runit/chpst.c index 4de53f0..899a4ee 100644 --- a/runit/chpst.c +++ b/runit/chpst.c @@ -282,13 +282,13 @@ static void slimit(void) } /* 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(); @@ -347,7 +347,7 @@ int chpst_main(int argc ATTRIBUTE_UNUSED, char **argv) 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; @@ -359,7 +359,7 @@ static void setuidgid(int argc ATTRIBUTE_UNUSED, char **argv) 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; @@ -371,7 +371,7 @@ static void envuidgid(int argc ATTRIBUTE_UNUSED, char **argv) 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; @@ -383,7 +383,7 @@ static void envdir(int argc ATTRIBUTE_UNUSED, char **argv) 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:", diff --git a/runit/runit_lib.h b/runit/runit_lib.h index c94e61c..b0b6dc2 100644 --- a/runit/runit_lib.h +++ b/runit/runit_lib.h @@ -88,9 +88,9 @@ extern unsigned pmatch(const char *, const char *, unsigned); * 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; diff --git a/runit/runsv.c b/runit/runsv.c index 6981fa7..bd0f3dc 100644 --- a/runit/runsv.c +++ b/runit/runsv.c @@ -127,12 +127,12 @@ static void warn_cannot(const char *m) 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 */ @@ -434,7 +434,7 @@ static int ctrl(struct svdir *s, char c) } 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; diff --git a/runit/runsvdir.c b/runit/runsvdir.c index df6b886..aaa4c47 100644 --- a/runit/runsvdir.c +++ b/runit/runsvdir.c @@ -89,11 +89,11 @@ static void warnx(const char *m1) 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; } @@ -229,7 +229,7 @@ static int setup_log(void) } 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 */ diff --git a/runit/sv.c b/runit/sv.c index d5a9bd9..1b92b9a 100644 --- a/runit/sv.c +++ b/runit/sv.c @@ -176,7 +176,7 @@ struct globals { #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); @@ -293,7 +293,7 @@ static unsigned svstatus_print(const char *m) return pid ? 1 : 2; } -static int status(const char *unused ATTRIBUTE_UNUSED) +static int status(const char *unused UNUSED_PARAM) { int r; diff --git a/runit/svlogd.c b/runit/svlogd.c index bfb9716..66b96b8 100644 --- a/runit/svlogd.c +++ b/runit/svlogd.c @@ -788,14 +788,14 @@ static int buffer_pread(/*int fd, */char *s, unsigned len) 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; @@ -812,14 +812,14 @@ static void sig_child_handler(int sig_no ATTRIBUTE_UNUSED) } } -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"); diff --git a/selinux/chcon.c b/selinux/chcon.c index 505ae4f..80a030f 100644 --- a/selinux/chcon.c +++ b/selinux/chcon.c @@ -30,9 +30,9 @@ static char *specified_context = NULL; 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; @@ -125,7 +125,7 @@ static const char chcon_longopts[] ALIGN1 = #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; diff --git a/selinux/getenforce.c b/selinux/getenforce.c index a39ce6d..21075cf 100644 --- a/selinux/getenforce.c +++ b/selinux/getenforce.c @@ -9,7 +9,7 @@ #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; diff --git a/selinux/load_policy.c b/selinux/load_policy.c index c5b0e7a..b7a5c6e 100644 --- a/selinux/load_policy.c +++ b/selinux/load_policy.c @@ -5,7 +5,7 @@ #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; diff --git a/selinux/matchpathcon.c b/selinux/matchpathcon.c index e0b374a..5cfd52a 100644 --- a/selinux/matchpathcon.c +++ b/selinux/matchpathcon.c @@ -30,7 +30,7 @@ static int print_matchpathcon(char *path, int noprint) #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; diff --git a/selinux/runcon.c b/selinux/runcon.c index 0f573d1..a9471ef 100644 --- a/selinux/runcon.c +++ b/selinux/runcon.c @@ -88,7 +88,7 @@ static const char runcon_longopts[] ALIGN1 = #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; diff --git a/selinux/selinuxenabled.c b/selinux/selinuxenabled.c index c6e947c..ea233d8 100644 --- a/selinux/selinuxenabled.c +++ b/selinux/selinuxenabled.c @@ -8,7 +8,7 @@ #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(); } diff --git a/selinux/sestatus.c b/selinux/sestatus.c index ec39afc..3b027ee 100644 --- a/selinux/sestatus.c +++ b/selinux/sestatus.c @@ -159,7 +159,7 @@ static void display_verbose(void) } 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; diff --git a/selinux/setfiles.c b/selinux/setfiles.c index 991c13c..d567f83 100644 --- a/selinux/setfiles.c +++ b/selinux/setfiles.c @@ -99,7 +99,7 @@ enum { #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 */ } @@ -394,8 +394,8 @@ static int restore(const char *file) 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 */ diff --git a/shell/ash.c b/shell/ash.c index 58bfc52..77fe91a 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -261,7 +261,7 @@ extern struct globals_misc *const ash_ptr_to_globals_misc; * 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) { @@ -281,7 +281,7 @@ 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) { @@ -1048,7 +1048,7 @@ ash_vmsg(const char *msg, va_list ap) * 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) { @@ -1068,7 +1068,7 @@ 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, ...) { @@ -1080,7 +1080,7 @@ 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, ...) { @@ -2462,7 +2462,7 @@ docd(const char *dest, int flags) } 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; @@ -2526,7 +2526,7 @@ cdcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) } 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; @@ -3128,7 +3128,7 @@ printalias(const struct alias *ap) * 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; @@ -3163,7 +3163,7 @@ aliascmd(int argc ATTRIBUTE_UNUSED, char **argv) } static int -unaliascmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) +unaliascmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) { int i; @@ -3670,7 +3670,7 @@ restartjob(struct job *jp, int mode) } static int -fg_bgcmd(int argc ATTRIBUTE_UNUSED, char **argv) +fg_bgcmd(int argc UNUSED_PARAM, char **argv) { struct job *jp; FILE *out; @@ -3957,7 +3957,7 @@ showjobs(FILE *out, int mode) } static int -jobscmd(int argc ATTRIBUTE_UNUSED, char **argv) +jobscmd(int argc UNUSED_PARAM, char **argv) { int mode, m; @@ -4010,7 +4010,7 @@ getstatus(struct job *job) } static int -waitcmd(int argc ATTRIBUTE_UNUSED, char **argv) +waitcmd(int argc UNUSED_PARAM, char **argv) { struct job *job; int retval; @@ -5681,7 +5681,7 @@ argstr(char *p, int flag, struct strlist *var_str_list) } 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 @@ -5785,7 +5785,7 @@ scanright(char *startp, char *rmesc, char *rmescend, char *str, int quotes, 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) { @@ -6906,7 +6906,7 @@ tryexec(USE_FEATURE_SH_STANDALONE(int applet_no,) char *cmd, char **argv, char * * 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) { @@ -7083,7 +7083,7 @@ addcmdentry(char *name, struct cmdentry *entry) } 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; @@ -7385,7 +7385,7 @@ describe_command(char *command, int describe_command_verbose) } static int -typecmd(int argc ATTRIBUTE_UNUSED, char **argv) +typecmd(int argc UNUSED_PARAM, char **argv) { int i = 1; int err = 0; @@ -7404,7 +7404,7 @@ typecmd(int argc ATTRIBUTE_UNUSED, char **argv) #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 { @@ -8341,7 +8341,7 @@ mklocal(char *name) * The "local" command. */ static int -localcmd(int argc ATTRIBUTE_UNUSED, char **argv) +localcmd(int argc UNUSED_PARAM, char **argv) { char *name; @@ -8353,19 +8353,19 @@ localcmd(int argc ATTRIBUTE_UNUSED, char **argv) } 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 */ @@ -8380,7 +8380,7 @@ execcmd(int argc ATTRIBUTE_UNUSED, char **argv) * 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; @@ -8561,7 +8561,7 @@ isassignment(const char *p) 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 */ @@ -8874,7 +8874,7 @@ prehash(union node *n) * 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; @@ -9377,7 +9377,7 @@ chkmail(void) } static void -changemail(const char *val ATTRIBUTE_UNUSED) +changemail(const char *val UNUSED_PARAM) { mail_var_path_changed = 1; } @@ -9533,7 +9533,7 @@ options(int cmdline) * 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; @@ -9595,7 +9595,7 @@ showvars(const char *sep_prefix, int on, int off) * 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; @@ -9797,7 +9797,7 @@ static struct heredoc *heredoc; */ #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) { @@ -9810,7 +9810,7 @@ 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) { @@ -11414,7 +11414,7 @@ evalstring(char *s, int mask) * The eval command. */ static int -evalcmd(int argc ATTRIBUTE_UNUSED, char **argv) +evalcmd(int argc UNUSED_PARAM, char **argv) { char *p; char *concat; @@ -11563,7 +11563,7 @@ dotcmd(int argc, char **argv) } static int -exitcmd(int argc ATTRIBUTE_UNUSED, char **argv) +exitcmd(int argc UNUSED_PARAM, char **argv) { if (stoppedjobs()) return 0; @@ -11787,7 +11787,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path) * 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; @@ -11840,7 +11840,7 @@ trapcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) * 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; @@ -11876,7 +11876,7 @@ helpcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) * 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; @@ -11927,7 +11927,7 @@ unsetfunc(const 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; @@ -11965,7 +11965,7 @@ static const unsigned char timescmd_str[] ALIGN1 = { }; 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; @@ -12017,7 +12017,7 @@ dash_arith(const char *s) * Copyright (C) 2003 Vladimir Oleynik */ static int -letcmd(int argc ATTRIBUTE_UNUSED, char **argv) +letcmd(int argc UNUSED_PARAM, char **argv) { arith_t i; @@ -12059,7 +12059,7 @@ typedef enum __rlimit_resource rlim_t; * -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 }; @@ -12256,7 +12256,7 @@ readcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) } 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"; @@ -12431,7 +12431,7 @@ printlim(enum limtype how, const struct rlimit *limit, } 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; @@ -13194,7 +13194,7 @@ arith(const char *expr, int *perrcode) /* * Called to exit the shell. */ -static void exitshell(void) ATTRIBUTE_NORETURN; +static void exitshell(void) NORETURN; static void exitshell(void) { @@ -13373,7 +13373,7 @@ extern int etext(); * 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; diff --git a/shell/cttyhack.c b/shell/cttyhack.c index bbe5149..0aa4b8a 100644 --- a/shell/cttyhack.c +++ b/shell/cttyhack.c @@ -38,7 +38,7 @@ struct serial_struct { }; 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]; diff --git a/shell/hush.c b/shell/hush.c index 72186f9..5b5a542 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -538,8 +538,8 @@ static int run_list(struct pipe *pi); #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); @@ -805,14 +805,14 @@ static void set_every_sighandler(void (*handler)(int)) 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; @@ -849,7 +849,7 @@ static void handler_ctrl_z(int sig ATTRIBUTE_UNUSED) * (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. */ @@ -866,7 +866,7 @@ static void sigexit(int sig) } /* 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 */ @@ -4004,7 +4004,7 @@ int lash_main(int argc, char **argv) /* * Built-ins */ -static int builtin_true(char **argv ATTRIBUTE_UNUSED) +static int builtin_true(char **argv UNUSED_PARAM) { return 0; } @@ -4188,7 +4188,7 @@ static int builtin_fg_bg(char **argv) #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; @@ -4203,7 +4203,7 @@ static int builtin_help(char **argv ATTRIBUTE_UNUSED) #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; @@ -4220,7 +4220,7 @@ static int builtin_jobs(char **argv ATTRIBUTE_UNUSED) } #endif -static int builtin_pwd(char **argv ATTRIBUTE_UNUSED) +static int builtin_pwd(char **argv UNUSED_PARAM) { puts(set_cwd()); return EXIT_SUCCESS; diff --git a/shell/lash_unused.c b/shell/lash_unused.c index 59199de..7084089 100644 --- a/shell/lash_unused.c +++ b/shell/lash_unused.c @@ -119,7 +119,7 @@ static void remove_job(struct jobset *j_list, struct job *job); 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); @@ -177,7 +177,7 @@ static inline void debug_printf(const char *format, ...) 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 /* @@ -308,7 +308,7 @@ static int builtin_fg_bg(struct child_prog *child) } /* 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; @@ -342,7 +342,7 @@ static int builtin_jobs(struct child_prog *child) /* 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); diff --git a/shell/msh.c b/shell/msh.c index 2b6b385..44213c6 100644 --- a/shell/msh.c +++ b/shell/msh.c @@ -45,7 +45,7 @@ # 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; @@ -780,7 +780,7 @@ static void closeall(void) /* 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); @@ -788,7 +788,7 @@ static void fail(void) } /* 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")); @@ -1450,7 +1450,7 @@ static void next(int f) 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; @@ -1545,7 +1545,7 @@ static int gmatch(const char *s, const char *p) * 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; @@ -1558,7 +1558,7 @@ static void yyerror(const char *s) fail(); } -static void zzerr(void) ATTRIBUTE_NORETURN; +static void zzerr(void) NORETURN; static void zzerr(void) { yyerror("syntax error"); @@ -3163,7 +3163,7 @@ static int run(struct ioarg *argp, int (*f) (struct ioarg *)) * 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; @@ -3199,12 +3199,12 @@ static int dohelp(struct op *t ATTRIBUTE_UNUSED, char **args ATTRIBUTE_UNUSED) 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; @@ -3225,7 +3225,7 @@ static int dochdir(struct op *t ATTRIBUTE_UNUSED, char **args) return 1; } -static int doshift(struct op *t ATTRIBUTE_UNUSED, char **args) +static int doshift(struct op *t UNUSED_PARAM, char **args) { int n; @@ -3244,7 +3244,7 @@ static int doshift(struct op *t ATTRIBUTE_UNUSED, char **args) /* * 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; @@ -3259,7 +3259,7 @@ static int dologin(struct op *t ATTRIBUTE_UNUSED, char **args) 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; @@ -3309,7 +3309,7 @@ static int doexec(struct op *t, char **args) 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; @@ -3363,7 +3363,7 @@ static int dodot(struct op *t ATTRIBUTE_UNUSED, char **args) 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; @@ -3379,7 +3379,7 @@ static int dowait(struct op *t ATTRIBUTE_UNUSED, char **args) 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; @@ -3406,12 +3406,12 @@ static int doread(struct op *t ATTRIBUTE_UNUSED, char **args) 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; @@ -3492,12 +3492,12 @@ static int getn(char *as) 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); } @@ -3525,7 +3525,7 @@ static int brkcontin(char *cp, int val) /* NOTREACHED */ } -static int doexit(struct op *t ATTRIBUTE_UNUSED, char **args) +static int doexit(struct op *t UNUSED_PARAM, char **args) { char *cp; @@ -3541,13 +3541,13 @@ static int doexit(struct op *t ATTRIBUTE_UNUSED, char **args) 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; @@ -3583,7 +3583,7 @@ static void badid(char *s) 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; @@ -3658,7 +3658,7 @@ static void times_fmt(char *buf, clock_t val, unsigned clk_tck) #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); diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index e719001..c4bbf15 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c @@ -39,7 +39,7 @@ enum { }; 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; diff --git a/sysklogd/logread.c b/sysklogd/logread.c index 1753ce3..603a377 100644 --- a/sysklogd/logread.c +++ b/sysklogd/logread.c @@ -43,7 +43,7 @@ struct globals { 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 @@ -60,7 +60,7 @@ static void sem_up(int semid) error_exit("semop[SMrup]"); } -static void interrupted(int sig ATTRIBUTE_UNUSED) +static void interrupted(int sig UNUSED_PARAM) { signal(SIGINT, SIG_IGN); shmdt(shbuf); @@ -68,7 +68,7 @@ static void interrupted(int sig ATTRIBUTE_UNUSED) } 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 */ diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index b9af9c5..4c9efd8 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -541,7 +541,7 @@ static int try_to_resolve_remote(void) } #endif -static void do_syslogd(void) ATTRIBUTE_NORETURN; +static void do_syslogd(void) NORETURN; static void do_syslogd(void) { int sock_fd; @@ -638,7 +638,7 @@ static void do_syslogd(void) } 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; diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index 73b2595..840358c 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c @@ -13,7 +13,7 @@ #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; diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c index eac7b15..094d620 100644 --- a/util-linux/fdformat.c +++ b/util-linux/fdformat.c @@ -41,7 +41,7 @@ struct format_descr { #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; diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index a1d3150..b44a2b4 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c @@ -81,12 +81,12 @@ struct partition { 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 diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index cd17afa..b0d5c6a 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c @@ -289,7 +289,7 @@ static void recursive_check(unsigned ino); 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) @@ -1204,7 +1204,7 @@ void check2(void); #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; diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index a03d61b..3d28364 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c @@ -90,7 +90,7 @@ static void from_sys_clock(int utc) #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; diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c index 111defa..9201257 100644 --- a/util-linux/ipcs.c +++ b/util-linux/ipcs.c @@ -559,7 +559,7 @@ static void print_sem(int semid) } 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; diff --git a/util-linux/mdev.c b/util-linux/mdev.c index bacccc0..c710937 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c @@ -300,9 +300,9 @@ static void make_device(char *path, int delete) /* 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; @@ -319,9 +319,9 @@ static int FAST_FUNC fileAction(const char *fileName, } /* 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); diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index 1e00a08..ceeb72a 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c @@ -495,7 +495,7 @@ static size_t do_check(char *buffer, size_t try, unsigned current_block) 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; @@ -621,7 +621,7 @@ static void setup_tables(void) } 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; diff --git a/util-linux/more.c b/util-linux/more.c index 2577a67..9395466 100644 --- a/util-linux/more.c +++ b/util-linux/more.c @@ -36,7 +36,7 @@ struct globals { #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); @@ -51,7 +51,7 @@ static void gotsig(int sig ATTRIBUTE_UNUSED) #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; diff --git a/util-linux/mount.c b/util-linux/mount.c index 3b77af7..f73ad60 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -47,7 +47,7 @@ /* 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)); @@ -914,7 +914,7 @@ static inline int daemonize(void) { return -ENOSYS; } #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; } @@ -1733,7 +1733,7 @@ static int singlemount(struct mntent *mp, int ignore_busy) 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; diff --git a/util-linux/rdate.c b/util-linux/rdate.c index 9e7bdba..0880edf 100644 --- a/util-linux/rdate.c +++ b/util-linux/rdate.c @@ -12,7 +12,7 @@ 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"); } @@ -43,7 +43,7 @@ static time_t askremotedate(const char *host) } 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; diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c index cac5fa4..1c15712 100644 --- a/util-linux/readprofile.c +++ b/util-linux/readprofile.c @@ -42,7 +42,7 @@ static const char defaultmap[] ALIGN1 = "/boot/System.map"; 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; diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c index 2b2634f..a9766ca 100644 --- a/util-linux/rtcwake.c +++ b/util-linux/rtcwake.c @@ -98,7 +98,7 @@ static void setup_alarm(int fd, time_t *wakeup) #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; diff --git a/util-linux/script.c b/util-linux/script.c index e70294e..39ec546 100644 --- a/util-linux/script.c +++ b/util-linux/script.c @@ -15,13 +15,13 @@ 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; diff --git a/util-linux/setarch.c b/util-linux/setarch.c index 1f979a7..250a938 100644 --- a/util-linux/setarch.c +++ b/util-linux/setarch.c @@ -12,7 +12,7 @@ #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; diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index 6eafa3e..863f773 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c @@ -69,7 +69,7 @@ static int do_em_all(void) } 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; diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index bae695b..1f6ec2d 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c @@ -65,7 +65,7 @@ static void delete_contents(const char *directory) } 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; diff --git a/util-linux/umount.c b/util-linux/umount.c index 9fa3cd2..00f1253 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c @@ -15,7 +15,7 @@ /* 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)); @@ -37,7 +37,7 @@ static struct mntent *getmntent_r(FILE* stream, struct mntent* result, //#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 */ -- cgit v1.1