*: add -Wunused-parameter; fix resulting breakage
function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
This commit is contained in:
+1
-1
@@ -435,7 +435,7 @@ static int arp_show(char *name)
|
||||
}
|
||||
|
||||
int arp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int arp_main(int argc, char **argv)
|
||||
int arp_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
char *hw_type;
|
||||
char *protocol;
|
||||
|
||||
+1
-1
@@ -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, char **argv)
|
||||
int arping_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
const char *device = "eth0";
|
||||
char *source = NULL;
|
||||
|
||||
+6
-3
@@ -321,15 +321,15 @@ static int process_packet(uint8_t * buf)
|
||||
/*
|
||||
* Exit on signal
|
||||
*/
|
||||
static void interrupt(int x)
|
||||
static void interrupt(int sig)
|
||||
{
|
||||
/* unlink("/var/run/dnsd.lock"); */
|
||||
bb_error_msg("interrupt, exiting\n");
|
||||
exit(2);
|
||||
kill_myself_with_sig(sig);
|
||||
}
|
||||
|
||||
int dnsd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int dnsd_main(int argc, char **argv)
|
||||
int dnsd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
const char *listen_interface = "0.0.0.0";
|
||||
char *sttl, *sport;
|
||||
@@ -387,6 +387,9 @@ int dnsd_main(int argc, char **argv)
|
||||
// Or else we can exhibit usual UDP ugliness:
|
||||
// [ip1.multihomed.ip2] <= query to ip1 <= peer
|
||||
// [ip1.multihomed.ip2] => reply from ip2 => peer (confused)
|
||||
|
||||
// TODO: recv_from_to
|
||||
|
||||
r = recvfrom(udps, buf, sizeof(buf), 0, &lsa->u.sa, &fromlen);
|
||||
if (OPT_verbose)
|
||||
bb_info_msg("Got UDP packet");
|
||||
|
||||
@@ -297,7 +297,7 @@ static const char ftpgetput_longopts[] ALIGN1 =
|
||||
#endif
|
||||
|
||||
int ftpgetput_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int ftpgetput_main(int argc, char **argv)
|
||||
int ftpgetput_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
/* content-length of the file */
|
||||
unsigned opt;
|
||||
|
||||
+2
-2
@@ -1754,7 +1754,7 @@ 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)
|
||||
static void exit_on_signal(int sig ATTRIBUTE_UNUSED)
|
||||
{
|
||||
send_headers_and_exit(HTTP_REQUEST_TIMEOUT);
|
||||
}
|
||||
@@ -2275,7 +2275,7 @@ enum {
|
||||
|
||||
|
||||
int httpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int httpd_main(int argc, char **argv)
|
||||
int httpd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int server_socket = server_socket; /* for gcc */
|
||||
unsigned opt;
|
||||
|
||||
@@ -150,7 +150,7 @@ static int release(char *master_ifname, char *slave_ifname);
|
||||
|
||||
|
||||
int ifenslave_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int ifenslave_main(int argc, char **argv)
|
||||
int ifenslave_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
char *master_ifname, *slave_ifname;
|
||||
int rv;
|
||||
|
||||
@@ -530,7 +530,7 @@ static int dhcp_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int manual_up_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int manual_up_down(struct interface_defn_t *ifd ATTRIBUTE_UNUSED, execfn *exec ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
+2
-2
@@ -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, char **argv)
|
||||
int inetd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
struct sigaction sa, saved_pipe_handler;
|
||||
servtab_t *sep, *sep2;
|
||||
@@ -1492,7 +1492,7 @@ static void init_ring(void)
|
||||
}
|
||||
/* Character generator. MMU arches only. */
|
||||
/* ARGSUSED */
|
||||
static void chargen_stream(int s, servtab_t *sep)
|
||||
static void chargen_stream(int s, servtab_t *sep ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char *rs;
|
||||
int len;
|
||||
|
||||
@@ -237,7 +237,7 @@ static char *UNSPEC_print(unsigned char *ptr)
|
||||
}
|
||||
|
||||
/* Display an UNSPEC socket address. */
|
||||
static const char *UNSPEC_sprint(struct sockaddr *sap, int numeric)
|
||||
static const char *UNSPEC_sprint(struct sockaddr *sap, int numeric ATTRIBUTE_UNUSED)
|
||||
{
|
||||
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
|
||||
return "[NONE SET]";
|
||||
|
||||
+6
-6
@@ -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, char **argv)
|
||||
int ipaddr_main(int argc ATTRIBUTE_UNUSED, 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, char **argv)
|
||||
int iplink_main(int argc ATTRIBUTE_UNUSED, 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, char **argv)
|
||||
int iproute_main(int argc ATTRIBUTE_UNUSED, 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, char **argv)
|
||||
int iprule_main(int argc ATTRIBUTE_UNUSED, 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, char **argv)
|
||||
int iptunnel_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
return ip_do(do_iptunnel, argv);
|
||||
}
|
||||
@@ -73,7 +73,7 @@ int iptunnel_main(int argc, char **argv)
|
||||
|
||||
|
||||
int ip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int ip_main(int argc, char **argv)
|
||||
int ip_main(int argc ATTRIBUTE_UNUSED, 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)
|
||||
static int do_timeout(void **paramp ATTRIBUTE_UNUSED)
|
||||
{
|
||||
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, char **argv)
|
||||
int fakeidentd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
enum {
|
||||
OPT_foreground = 0x1,
|
||||
|
||||
@@ -39,7 +39,9 @@ static struct idxmap *find_by_index(int idx)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int ll_remember_index(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
|
||||
int ll_remember_index(struct sockaddr_nl *who ATTRIBUTE_UNUSED,
|
||||
struct nlmsghdr *n,
|
||||
void *arg ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int h;
|
||||
struct ifinfomsg *ifi = NLMSG_DATA(n);
|
||||
|
||||
@@ -177,7 +177,7 @@ static void unarm(void)
|
||||
}
|
||||
|
||||
/* timeout and other signal handling cruft */
|
||||
static void tmtravel(int sig)
|
||||
static void tmtravel(int sig ATTRIBUTE_UNUSED)
|
||||
{
|
||||
unarm();
|
||||
longjmp(jbuf, 1);
|
||||
|
||||
@@ -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, char **argv)
|
||||
int netstat_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
const char *net_conn_line_header = PRINT_NET_CONN_HEADER;
|
||||
unsigned opt;
|
||||
|
||||
+4
-4
@@ -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, char **argv)
|
||||
int ping_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
len_and_sockaddr *lsa;
|
||||
#if ENABLE_PING6
|
||||
@@ -495,7 +495,7 @@ static void unpack4(char *buf, int sz, struct sockaddr_in *from)
|
||||
}
|
||||
}
|
||||
#if ENABLE_PING6
|
||||
static void unpack6(char *packet, int sz, struct sockaddr_in6 *from, int hoplimit)
|
||||
static void unpack6(char *packet, int sz, /*struct sockaddr_in6 *from,*/ int hoplimit)
|
||||
{
|
||||
struct icmp6_hdr *icmppkt;
|
||||
char buf[INET6_ADDRSTRLEN];
|
||||
@@ -658,7 +658,7 @@ static void ping6(len_and_sockaddr *lsa)
|
||||
hoplimit = *(int*)CMSG_DATA(mp);
|
||||
}
|
||||
}
|
||||
unpack6(packet, c, &from, hoplimit);
|
||||
unpack6(packet, c, /*&from,*/ hoplimit);
|
||||
if (pingcount > 0 && nreceived >= pingcount)
|
||||
break;
|
||||
}
|
||||
@@ -683,7 +683,7 @@ static void ping(len_and_sockaddr *lsa)
|
||||
}
|
||||
|
||||
int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int ping_main(int argc, char **argv)
|
||||
int ping_main(int argc ATTRIBUTE_UNUSED, 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, char **argv)
|
||||
int pscan_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
const char *opt_max_port = "1024"; /* -P: default max port */
|
||||
const char *opt_min_port = "1"; /* -p: default min port */
|
||||
|
||||
+3
-3
@@ -539,7 +539,7 @@ void bb_displayroutes(int noresolve, int netstatfmt)
|
||||
|
||||
#if ENABLE_FEATURE_IPV6
|
||||
|
||||
static void INET6_displayroutes(int noresolve)
|
||||
static void INET6_displayroutes(void)
|
||||
{
|
||||
char addr6[128], *naddr6;
|
||||
/* In addr6x, we store both 40-byte ':'-delimited ipv6 addresses.
|
||||
@@ -642,7 +642,7 @@ static const char tbl_verb[] ALIGN1 =
|
||||
;
|
||||
|
||||
int route_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int route_main(int argc, char **argv)
|
||||
int route_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
unsigned opt;
|
||||
int what;
|
||||
@@ -675,7 +675,7 @@ int route_main(int argc, char **argv)
|
||||
int noresolve = (opt & ROUTE_OPT_n) ? 0x0fff : 0;
|
||||
#if ENABLE_FEATURE_IPV6
|
||||
if (opt & ROUTE_OPT_INET6)
|
||||
INET6_displayroutes(noresolve);
|
||||
INET6_displayroutes();
|
||||
else
|
||||
#endif
|
||||
bb_displayroutes(noresolve, opt & ROUTE_OPT_e);
|
||||
|
||||
@@ -252,7 +252,7 @@ static void pop3_message(const char *filename)
|
||||
#endif
|
||||
|
||||
int sendgetmail_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int sendgetmail_main(int argc, char **argv)
|
||||
int sendgetmail_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
llist_t *opt_recipients = NULL;
|
||||
|
||||
|
||||
@@ -114,13 +114,13 @@ static void set_state(struct termios *state, int encap)
|
||||
}
|
||||
}
|
||||
|
||||
static void sig_handler(int signo)
|
||||
static void sig_handler(int signo ATTRIBUTE_UNUSED)
|
||||
{
|
||||
restore_state_and_exit(0);
|
||||
}
|
||||
|
||||
int slattach_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int slattach_main(int argc, char **argv)
|
||||
int slattach_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
/* Line discipline code table */
|
||||
static const char proto_names[] ALIGN1 =
|
||||
|
||||
@@ -338,7 +338,7 @@ free_session(struct tsession *ts)
|
||||
|
||||
#endif
|
||||
|
||||
static void handle_sigchld(int sig)
|
||||
static void handle_sigchld(int sig ATTRIBUTE_UNUSED)
|
||||
{
|
||||
pid_t pid;
|
||||
struct tsession *ts;
|
||||
@@ -360,7 +360,7 @@ static void handle_sigchld(int sig)
|
||||
}
|
||||
|
||||
int telnetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int telnetd_main(int argc, char **argv)
|
||||
int telnetd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
fd_set rdfdset, wrfdset;
|
||||
unsigned opt;
|
||||
|
||||
+1
-1
@@ -392,7 +392,7 @@ static int tftp( USE_GETPUT(const int cmd,)
|
||||
}
|
||||
|
||||
int tftp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int tftp_main(int argc, char **argv)
|
||||
int tftp_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
len_and_sockaddr *peer_lsa;
|
||||
const char *localfile = NULL;
|
||||
|
||||
@@ -129,7 +129,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, char **argv)
|
||||
int udhcpc_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
uint8_t *temp, *message;
|
||||
char *str_c, *str_V, *str_h, *str_F, *str_r, *str_T, *str_A, *str_t;
|
||||
|
||||
@@ -23,7 +23,7 @@ struct dhcpOfferedAddr *leases;
|
||||
|
||||
|
||||
int udhcpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int udhcpd_main(int argc, char **argv)
|
||||
int udhcpd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
fd_set rfds;
|
||||
struct timeval tv;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "dhcpd.h"
|
||||
|
||||
int dumpleases_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int dumpleases_main(int argc, char **argv)
|
||||
int dumpleases_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int fd;
|
||||
int i;
|
||||
|
||||
+1
-1
@@ -387,7 +387,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, char **argv)
|
||||
int wget_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
char buf[512];
|
||||
struct host_info server, target;
|
||||
|
||||
Reference in New Issue
Block a user