diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-17 12:00:54 +0300 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-17 12:00:54 +0300 |
commit | 68404f13d4bf4826e3609703dad5375763db28ab (patch) | |
tree | b89ed41daeb3a761ac9416a6eed090023b23e7e2 /networking | |
parent | a55bd05f3cea6c7cbfb45d15009cb70570c2a43b (diff) |
*: 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
Diffstat (limited to 'networking')
-rw-r--r-- | networking/arp.c | 2 | ||||
-rw-r--r-- | networking/arping.c | 2 | ||||
-rw-r--r-- | networking/dnsd.c | 9 | ||||
-rw-r--r-- | networking/ftpgetput.c | 2 | ||||
-rw-r--r-- | networking/httpd.c | 4 | ||||
-rw-r--r-- | networking/ifenslave.c | 2 | ||||
-rw-r--r-- | networking/ifupdown.c | 2 | ||||
-rw-r--r-- | networking/inetd.c | 4 | ||||
-rw-r--r-- | networking/interface.c | 2 | ||||
-rw-r--r-- | networking/ip.c | 12 | ||||
-rw-r--r-- | networking/isrv_identd.c | 4 | ||||
-rw-r--r-- | networking/libiproute/ll_map.c | 4 | ||||
-rw-r--r-- | networking/nc_bloaty.c | 2 | ||||
-rw-r--r-- | networking/netstat.c | 2 | ||||
-rw-r--r-- | networking/ping.c | 8 | ||||
-rw-r--r-- | networking/pscan.c | 2 | ||||
-rw-r--r-- | networking/route.c | 6 | ||||
-rw-r--r-- | networking/sendmail.c | 2 | ||||
-rw-r--r-- | networking/slattach.c | 4 | ||||
-rw-r--r-- | networking/telnetd.c | 4 | ||||
-rw-r--r-- | networking/tftp.c | 2 | ||||
-rw-r--r-- | networking/udhcp/dhcpc.c | 2 | ||||
-rw-r--r-- | networking/udhcp/dhcpd.c | 2 | ||||
-rw-r--r-- | networking/udhcp/dumpleases.c | 2 | ||||
-rw-r--r-- | networking/wget.c | 2 |
25 files changed, 47 insertions, 42 deletions
diff --git a/networking/arp.c b/networking/arp.c index 36985fc5a..c9b9d1d0d 100644 --- a/networking/arp.c +++ b/networking/arp.c @@ -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; diff --git a/networking/arping.c b/networking/arping.c index 2277ec55e..6a17b18ee 100644 --- a/networking/arping.c +++ b/networking/arping.c @@ -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; diff --git a/networking/dnsd.c b/networking/dnsd.c index 0a5278377..b269bc52a 100644 --- a/networking/dnsd.c +++ b/networking/dnsd.c @@ -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"); diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index 91f6fcd0d..6e2d96093 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c @@ -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; diff --git a/networking/httpd.c b/networking/httpd.c index 7b7446ed9..54f288c7a 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -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; diff --git a/networking/ifenslave.c b/networking/ifenslave.c index 76aaa7614..1e3d5bb95 100644 --- a/networking/ifenslave.c +++ b/networking/ifenslave.c @@ -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; diff --git a/networking/ifupdown.c b/networking/ifupdown.c index 58e69530c..6aa929a30 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c @@ -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; } diff --git a/networking/inetd.c b/networking/inetd.c index 41824dbc8..0ddfa6b45 100644 --- a/networking/inetd.c +++ b/networking/inetd.c @@ -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; diff --git a/networking/interface.c b/networking/interface.c index 04d12b37e..367d2b0bc 100644 --- a/networking/interface.c +++ b/networking/interface.c @@ -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]"; diff --git a/networking/ip.c b/networking/ip.c index 5d9785194..bb409c5ce 100644 --- a/networking/ip.c +++ b/networking/ip.c @@ -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") diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c index 33338572d..d60c9fbaf 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) +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, diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c index 7b5de92c2..3cfc9ccec 100644 --- a/networking/libiproute/ll_map.c +++ b/networking/libiproute/ll_map.c @@ -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); diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c index ce4829584..34f715fc5 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) +static void tmtravel(int sig ATTRIBUTE_UNUSED) { unarm(); longjmp(jbuf, 1); diff --git a/networking/netstat.c b/networking/netstat.c index 399ff9b42..fd8d8ecf3 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, char **argv) +int netstat_main(int argc ATTRIBUTE_UNUSED, 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 11138c036..93b2e02f1 100644 --- a/networking/ping.c +++ b/networking/ping.c @@ -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; diff --git a/networking/pscan.c b/networking/pscan.c index 830419371..022d21254 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, 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 */ diff --git a/networking/route.c b/networking/route.c index 6f945b9f8..53e3988c1 100644 --- a/networking/route.c +++ b/networking/route.c @@ -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); diff --git a/networking/sendmail.c b/networking/sendmail.c index eb356dcf5..241028b92 100644 --- a/networking/sendmail.c +++ b/networking/sendmail.c @@ -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; diff --git a/networking/slattach.c b/networking/slattach.c index 1987eb39c..3ffbb3ba8 100644 --- a/networking/slattach.c +++ b/networking/slattach.c @@ -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 = diff --git a/networking/telnetd.c b/networking/telnetd.c index 05de49e8a..20c57925f 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c @@ -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; diff --git a/networking/tftp.c b/networking/tftp.c index 6cad295e3..14c340b22 100644 --- a/networking/tftp.c +++ b/networking/tftp.c @@ -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; diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index 7fca184ab..576b1cbb8 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c @@ -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; diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index eb7323da7..263719657 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, char **argv) +int udhcpd_main(int argc ATTRIBUTE_UNUSED, char **argv) { fd_set rfds; struct timeval tv; diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index 218e6bc57..83b384177 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c @@ -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; diff --git a/networking/wget.c b/networking/wget.c index a77a2add7..dc1dc2ad9 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -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; |