*: 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

diff --git a/networking/arp.c b/networking/arp.c
index 36985fc..c9b9d1d 100644
--- a/networking/arp.c
+++ b/networking/arp.c
@@ -435,7 +435,7 @@
 }
 
 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 2277ec5..6a17b18 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -245,7 +245,7 @@
 }
 
 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 0a52783..b269bc5 100644
--- a/networking/dnsd.c
+++ b/networking/dnsd.c
@@ -321,15 +321,15 @@
 /*
  * 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 @@
 // 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 91f6fcd..6e2d960 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -297,7 +297,7 @@
 #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 7b7446e..54f288c 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1754,7 +1754,7 @@
  * 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 @@
 
 
 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 76aaa76..1e3d5bb 100644
--- a/networking/ifenslave.c
+++ b/networking/ifenslave.c
@@ -150,7 +150,7 @@
 
 
 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 58e6953..6aa929a 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -530,7 +530,7 @@
 #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 41824db..0ddfa6b 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -1128,7 +1128,7 @@
 }
 
 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 @@
 }
 /* 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 04d12b3..367d2b0 100644
--- a/networking/interface.c
+++ b/networking/interface.c
@@ -237,7 +237,7 @@
 }
 
 /* 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 5d97851..bb409c5 100644
--- a/networking/ip.c
+++ b/networking/ip.c
@@ -37,35 +37,35 @@
 
 #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 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 3333857..d60c9fb 100644
--- a/networking/isrv_identd.c
+++ b/networking/isrv_identd.c
@@ -76,7 +76,7 @@
 	return retval;
 }
 
-static int do_timeout(void **paramp)
+static int do_timeout(void **paramp ATTRIBUTE_UNUSED)
 {
 	return 1; /* terminate session */
 }
@@ -93,7 +93,7 @@
 }
 
 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 7b5de92..3cfc9cc 100644
--- a/networking/libiproute/ll_map.c
+++ b/networking/libiproute/ll_map.c
@@ -39,7 +39,9 @@
 	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 ce48295..34f715f 100644
--- a/networking/nc_bloaty.c
+++ b/networking/nc_bloaty.c
@@ -177,7 +177,7 @@
 }
 
 /* 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 399ff9b..fd8d8ec 100644
--- a/networking/netstat.c
+++ b/networking/netstat.c
@@ -486,7 +486,7 @@
 }
 
 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 11138c0..93b2e02 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -174,7 +174,7 @@
 #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 @@
 	}
 }
 #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 @@
 				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 @@
 }
 
 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 8304193..022d212 100644
--- a/networking/pscan.c
+++ b/networking/pscan.c
@@ -31,7 +31,7 @@
 #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 6f945b9..53e3988 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -539,7 +539,7 @@
 
 #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 @@
 ;
 
 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 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 eb356dc..241028b 100644
--- a/networking/sendmail.c
+++ b/networking/sendmail.c
@@ -252,7 +252,7 @@
 #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 1987eb3..3ffbb3b 100644
--- a/networking/slattach.c
+++ b/networking/slattach.c
@@ -114,13 +114,13 @@
 	}
 }
 
-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 05de49e..20c5792 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -338,7 +338,7 @@
 
 #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 @@
 }
 
 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 6cad295..14c340b 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -392,7 +392,7 @@
 }
 
 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 7fca184..576b1cb 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -129,7 +129,7 @@
 
 
 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 eb7323d..2637196 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -23,7 +23,7 @@
 
 
 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 218e6bc..83b3841 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 a77a2ad..dc1dc2a 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -387,7 +387,7 @@
 
 
 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;