diff options
-rw-r--r-- | usr.bin/netstat/inet.c | 2 | ||||
-rw-r--r-- | usr.bin/netstat/inet6.c | 2 | ||||
-rw-r--r-- | usr.bin/netstat/main.c | 4 | ||||
-rw-r--r-- | usr.bin/netstat/netisr.c | 6 | ||||
-rw-r--r-- | usr.bin/netstat/sctp.c | 6 | ||||
-rw-r--r-- | usr.bin/netstat/unix.c | 1 |
6 files changed, 10 insertions, 11 deletions
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 8094e5b..57123a7 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -89,7 +89,7 @@ static int udp_done, tcp_done, sdp_done; #endif /* INET6 */ static int -pcblist_sysctl(int proto, const char *name, char **bufp, int istcp) +pcblist_sysctl(int proto, const char *name, char **bufp, int istcp __unused) { const char *mibvar; char *buf; diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c index 1a19fa5..9f51d06 100644 --- a/usr.bin/netstat/inet6.c +++ b/usr.bin/netstat/inet6.c @@ -335,7 +335,7 @@ static const char *ip6nh[] = { "#255", }; -static char *srcrule_str[] = { +static const char *srcrule_str[] = { "first candidate", "same address", "appropriate scope", diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index 09c0096..2a996ae 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -640,9 +640,7 @@ main(int argc, char *argv[]) * is not in the namelist, ignore this one. */ static void -printproto(tp, name) - struct protox *tp; - const char *name; +printproto(struct protox *tp, const char *name) { void (*pr)(u_long, const char *, int, int); u_long off; diff --git a/usr.bin/netstat/netisr.c b/usr.bin/netstat/netisr.c index cc05c38..6c945c3 100644 --- a/usr.bin/netstat/netisr.c +++ b/usr.bin/netstat/netisr.c @@ -76,12 +76,12 @@ static u_int *nws_array; static u_int maxprot; static void -netisr_dispatch_policy_to_string(u_int dispatch_policy, char *buf, +netisr_dispatch_policy_to_string(u_int policy, char *buf, size_t buflen) { const char *str; - switch (dispatch_policy) { + switch (policy) { case NETISR_DISPATCH_DEFAULT: str = "default"; break; @@ -102,7 +102,7 @@ netisr_dispatch_policy_to_string(u_int dispatch_policy, char *buf, } static void -netisr_load_kvm_uint(kvm_t *kd, char *name, u_int *p) +netisr_load_kvm_uint(kvm_t *kd, const char *name, u_int *p) { struct nlist nl[] = { { .n_name = name }, diff --git a/usr.bin/netstat/sctp.c b/usr.bin/netstat/sctp.c index 2f67b0c..a2ef7d568 100644 --- a/usr.bin/netstat/sctp.c +++ b/usr.bin/netstat/sctp.c @@ -77,7 +77,7 @@ static void sctp_statesprint(uint32_t state); #define NETSTAT_SCTP_STATES_SHUTDOWN_ACK_SENT 0x8 #define NETSTAT_SCTP_STATES_SHUTDOWN_PENDING 0x9 -char *sctpstates[] = { +const char *sctpstates[] = { "CLOSED", "BOUND", "LISTEN", @@ -393,7 +393,7 @@ sctp_process_inpcb(struct xsctp_inpcb *xinpcb, { int indent = 0, xladdr_total = 0, is_listening = 0; static int first = 1; - char *tname, *pname; + const char *tname, *pname; struct xsctp_tcb *xstcb; struct xsctp_laddr *xladdr; size_t offset_laddr; @@ -527,7 +527,7 @@ retry: */ void sctp_protopr(u_long off __unused, - const char *name, int af1, int proto) + const char *name __unused, int af1 __unused, int proto) { char *buf; const char *mibvar = "net.inet.sctp.assoclist"; diff --git a/usr.bin/netstat/unix.c b/usr.bin/netstat/unix.c index 9a643c2..027e812 100644 --- a/usr.bin/netstat/unix.c +++ b/usr.bin/netstat/unix.c @@ -199,6 +199,7 @@ unixpr(u_long count_off, u_long gencnt_off, u_long dhead_off, u_long shead_off, struct xunpcb *xunp; u_long head_off; + buf = NULL; for (type = SOCK_STREAM; type <= SOCK_SEQPACKET; type++) { if (live) ret = pcblist_sysctl(type, &buf); |