*: rename ATTRIBUTE_XXX to just XXX.
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
+1
-1
@@ -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"
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
+12
-12
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
+11
-11
@@ -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;
|
||||
|
||||
|
||||
@@ -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]";
|
||||
|
||||
+7
-7
@@ -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")
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
+1
-1
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
+7
-7
@@ -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;
|
||||
|
||||
+1
-1
@@ -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 */
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 =
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
+1
-1
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@
|
||||
struct arp_packet {
|
||||
struct ether_header eth;
|
||||
struct ether_arp arp;
|
||||
} ATTRIBUTE_PACKED;
|
||||
} PACKED;
|
||||
|
||||
enum {
|
||||
/* 169.254.0.0 */
|
||||
|
||||
Reference in New Issue
Block a user