diff options
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 36985fc..c9b9d1d 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 2277ec5..6a17b18 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 0a52783..b269bc5 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 91f6fcd..6e2d960 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 7b7446e..54f288c 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 76aaa76..1e3d5bb 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 58e6953..6aa929a 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 41824db..0ddfa6b 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 04d12b3..367d2b0 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 5d97851..bb409c5 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 3333857..d60c9fb 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 7b5de92..3cfc9cc 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 ce48295..34f715f 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 399ff9b..fd8d8ec 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 11138c0..93b2e02 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 8304193..022d212 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 6f945b9..53e3988 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 eb356dc..241028b 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 1987eb3..3ffbb3b 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 05de49e..20c5792 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 6cad295..14c340b 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 7fca184..576b1cb 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 eb7323d..2637196 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 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 @@ 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; |