remove warnings
remove superfluous declarations make things more consistent
This commit is contained in:
parent
5e0517186d
commit
f964d60dd3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78316
@ -103,7 +103,7 @@ static char mybuf[50];
|
||||
return mybuf;
|
||||
}
|
||||
|
||||
char *
|
||||
static char *
|
||||
at_pr_port(struct sockaddr_at *sat)
|
||||
{
|
||||
static char mybuf[50];
|
||||
@ -212,7 +212,7 @@ atalk_print2(struct sockaddr *sa, struct sockaddr *mask, int what)
|
||||
}
|
||||
|
||||
void
|
||||
atalkprotopr(u_long off, char *name)
|
||||
atalkprotopr(u_long off __unused, char *name, int af __unused)
|
||||
{
|
||||
struct ddpcb *this, *next;
|
||||
|
||||
@ -261,7 +261,7 @@ atalkprotopr(u_long off, char *name)
|
||||
* Dump DDP statistics structure.
|
||||
*/
|
||||
void
|
||||
ddp_stats(u_long off, char *name)
|
||||
ddp_stats(u_long off __unused, char *name, int af __unused)
|
||||
{
|
||||
struct ddpstat ddpstat;
|
||||
|
||||
|
@ -85,8 +85,9 @@ static char ntop_buf[INET6_ADDRSTRLEN]; /* for inet_ntop() */
|
||||
static int bdg_done;
|
||||
#endif
|
||||
|
||||
/* print bridge statistics */
|
||||
void
|
||||
bdg_stats(u_long dummy, char *name) /* print bridge statistics */
|
||||
bdg_stats(u_long dummy __unused, char *name, int af __unused)
|
||||
{
|
||||
int i;
|
||||
size_t slen ;
|
||||
@ -132,7 +133,7 @@ bdg_stats(u_long dummy, char *name) /* print bridge statistics */
|
||||
* Display a formatted value, or a '-' in the same space.
|
||||
*/
|
||||
static void
|
||||
show_stat(char *fmt, int width, u_long value, short showvalue)
|
||||
show_stat(const char *fmt, int width, u_long value, short showvalue)
|
||||
{
|
||||
char newfmt[32];
|
||||
|
||||
@ -670,7 +671,7 @@ sidewaysintpr(unsigned interval, u_long off)
|
||||
* Sets a flag to not wait for the alarm.
|
||||
*/
|
||||
static void
|
||||
catchalarm(int signo)
|
||||
catchalarm(int signo __unused)
|
||||
{
|
||||
signalled = YES;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ protopr(u_long proto, /* for sysctl version we pass proto # */
|
||||
}
|
||||
|
||||
/* Ignore sockets for protocols other than the desired one. */
|
||||
if (so->xso_protocol != proto)
|
||||
if (so->xso_protocol != (int)proto)
|
||||
continue;
|
||||
|
||||
/* Ignore PCBs which were freed during copyout. */
|
||||
@ -346,7 +346,7 @@ protopr(u_long proto, /* for sysctl version we pass proto # */
|
||||
* Dump TCP statistics structure.
|
||||
*/
|
||||
void
|
||||
tcp_stats(u_long off, char *name)
|
||||
tcp_stats(u_long off __unused, char *name, int af __unused)
|
||||
{
|
||||
struct tcpstat tcpstat;
|
||||
size_t len = sizeof tcpstat;
|
||||
@ -444,7 +444,7 @@ tcp_stats(u_long off, char *name)
|
||||
* Dump UDP statistics structure.
|
||||
*/
|
||||
void
|
||||
udp_stats(u_long off, char *name)
|
||||
udp_stats(u_long off __unused, char *name, int af __unused)
|
||||
{
|
||||
struct udpstat udpstat;
|
||||
size_t len = sizeof udpstat;
|
||||
@ -495,7 +495,7 @@ udp_stats(u_long off, char *name)
|
||||
* Dump IP statistics structure.
|
||||
*/
|
||||
void
|
||||
ip_stats(u_long off, char *name)
|
||||
ip_stats(u_long off __unused, char *name, int af __unused)
|
||||
{
|
||||
struct ipstat ipstat;
|
||||
size_t len = sizeof ipstat;
|
||||
@ -575,7 +575,7 @@ static char *icmpnames[] = {
|
||||
* Dump ICMP statistics.
|
||||
*/
|
||||
void
|
||||
icmp_stats(u_long off, char *name)
|
||||
icmp_stats(u_long off __unused, char *name, int af __unused)
|
||||
{
|
||||
struct icmpstat icmpstat;
|
||||
int i, first;
|
||||
@ -641,7 +641,7 @@ icmp_stats(u_long off, char *name)
|
||||
* Dump IGMP statistics structure.
|
||||
*/
|
||||
void
|
||||
igmp_stats(u_long off, char *name)
|
||||
igmp_stats(u_long off __unused, char *name, int af __unused)
|
||||
{
|
||||
struct igmpstat igmpstat;
|
||||
size_t len = sizeof igmpstat;
|
||||
|
@ -340,7 +340,7 @@ static char *ip6nh[] = {
|
||||
* Dump IP6 statistics structure.
|
||||
*/
|
||||
void
|
||||
ip6_stats(u_long off, char *name)
|
||||
ip6_stats(u_long off __unused, char *name, int af __unused)
|
||||
{
|
||||
struct ip6stat ip6stat;
|
||||
int first, i;
|
||||
@ -807,7 +807,7 @@ static char *icmp6names[] = {
|
||||
* Dump ICMP6 statistics.
|
||||
*/
|
||||
void
|
||||
icmp6_stats(u_long off, char *name)
|
||||
icmp6_stats(u_long off __unused, char *name, int af __unused)
|
||||
{
|
||||
struct icmp6stat icmp6stat;
|
||||
register int i, first;
|
||||
@ -945,7 +945,7 @@ icmp6_ifstats(char *ifname)
|
||||
* Dump PIM statistics structure.
|
||||
*/
|
||||
void
|
||||
pim6_stats(u_long off, char *name)
|
||||
pim6_stats(u_long off __unused, char *name, int af __unused)
|
||||
{
|
||||
struct pim6stat pim6stat;
|
||||
|
||||
@ -970,7 +970,7 @@ pim6_stats(u_long off, char *name)
|
||||
* Dump raw ip6 statistics structure.
|
||||
*/
|
||||
void
|
||||
rip6_stats(u_long off, char *name)
|
||||
rip6_stats(u_long off __unused, char *name, int af __unused)
|
||||
{
|
||||
struct rip6stat rip6stat;
|
||||
u_quad_t delivered;
|
||||
|
@ -162,7 +162,7 @@ static struct ipsecstat ipsecstat;
|
||||
static void print_ipsecstats (void);
|
||||
static const char *pfkey_msgtype_names (int);
|
||||
static void ipsec_hist (const u_quad_t *, size_t, const struct val2str *,
|
||||
size_t, const char *);
|
||||
const char *);
|
||||
|
||||
/*
|
||||
* Dump IPSEC statistics structure.
|
||||
@ -171,7 +171,6 @@ static void
|
||||
ipsec_hist(const u_quad_t *hist,
|
||||
size_t histmax,
|
||||
const struct val2str *name,
|
||||
size_t namemax,
|
||||
const char *title)
|
||||
{
|
||||
int first;
|
||||
@ -187,7 +186,7 @@ ipsec_hist(const u_quad_t *hist,
|
||||
first = 0;
|
||||
}
|
||||
for (p = name; p && p->str; p++) {
|
||||
if (p->val == proto)
|
||||
if (p->val == (int)proto)
|
||||
break;
|
||||
}
|
||||
if (p && p->str) {
|
||||
@ -205,7 +204,7 @@ print_ipsecstats(void)
|
||||
#define p(f, m) if (ipsecstat.f || sflag <= 1) \
|
||||
printf(m, (CAST)ipsecstat.f, plural(ipsecstat.f))
|
||||
#define hist(f, n, t) \
|
||||
ipsec_hist((f), sizeof(f)/sizeof(f[0]), (n), sizeof(n)/sizeof(n[0]), (t));
|
||||
ipsec_hist((f), sizeof(f)/sizeof(f[0]), (n), (t));
|
||||
|
||||
p(in_success, "\t" LLU " inbound packet%s processed successfully\n");
|
||||
p(in_polvio, "\t" LLU " inbound packet%s violated process security "
|
||||
@ -237,7 +236,7 @@ print_ipsecstats(void)
|
||||
}
|
||||
|
||||
void
|
||||
ipsec_stats(u_long off, char *name)
|
||||
ipsec_stats(u_long off __unused, char *name, int af __unused)
|
||||
{
|
||||
if (off == 0)
|
||||
return;
|
||||
@ -261,10 +260,10 @@ pfkey_msgtype_names(int x)
|
||||
}
|
||||
|
||||
void
|
||||
pfkey_stats(u_long off, char *name)
|
||||
pfkey_stats(u_long off __unused, char *name, int af __unused)
|
||||
{
|
||||
struct pfkeystat pfkeystat;
|
||||
int first, type;
|
||||
unsigned first, type;
|
||||
|
||||
if (off == 0)
|
||||
return;
|
||||
|
@ -83,7 +83,7 @@ static int first = 1;
|
||||
*/
|
||||
|
||||
void
|
||||
ipxprotopr(u_long off, char *name)
|
||||
ipxprotopr(u_long off, char *name, int af __unused)
|
||||
{
|
||||
struct ipxpcb cb;
|
||||
register struct ipxpcb *prev, *next;
|
||||
@ -159,7 +159,7 @@ ipxprotopr(u_long off, char *name)
|
||||
* Dump SPX statistics structure.
|
||||
*/
|
||||
void
|
||||
spx_stats(u_long off, char *name)
|
||||
spx_stats(u_long off, char *name, int af __unused)
|
||||
{
|
||||
struct spx_istat spx_istat;
|
||||
#define spxstat spx_istat.newstats
|
||||
@ -235,7 +235,7 @@ spx_stats(u_long off, char *name)
|
||||
* Dump IPX statistics structure.
|
||||
*/
|
||||
void
|
||||
ipx_stats(u_long off, char *name)
|
||||
ipx_stats(u_long off, char *name, int af __unused)
|
||||
{
|
||||
struct ipxstat ipxstat;
|
||||
|
||||
@ -278,7 +278,7 @@ static struct {
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
ipxerr_stats(u_long off, char *name)
|
||||
ipxerr_stats(u_long off, char *name, int af __unused)
|
||||
{
|
||||
struct ipx_errstat ipx_errstat;
|
||||
register int j;
|
||||
|
@ -115,7 +115,7 @@ extern void inetprint (struct in_addr *, int, char *);
|
||||
* Dump esis stats
|
||||
*/
|
||||
void
|
||||
esis_stats(u_long off, char *name)
|
||||
esis_stats(u_long off, char *name, int af __unused)
|
||||
{
|
||||
struct esis_stat esis_stat;
|
||||
|
||||
@ -142,7 +142,7 @@ esis_stats(u_long off, char *name)
|
||||
* Dump clnp statistics structure.
|
||||
*/
|
||||
void
|
||||
clnp_stats(u_long off, char *name)
|
||||
clnp_stats(u_long off, char *name, int af __unused)
|
||||
{
|
||||
struct clnp_stat clnp_stat;
|
||||
|
||||
@ -175,7 +175,7 @@ clnp_stats(u_long off, char *name)
|
||||
* Dump CLTP statistics structure.
|
||||
*/
|
||||
void
|
||||
cltp_stats(u_long off, char *name)
|
||||
cltp_stats(u_long off, char *name, int af __unused)
|
||||
{
|
||||
struct cltpstat cltpstat;
|
||||
|
||||
@ -209,7 +209,7 @@ static int first = 1;
|
||||
* -a (all) flag is specified.
|
||||
*/
|
||||
void
|
||||
iso_protopr(u_long off, char *name)
|
||||
iso_protopr(u_long off, char *name, int af __unused)
|
||||
{
|
||||
struct isopcb cb;
|
||||
register struct isopcb *prev, *next;
|
||||
@ -293,7 +293,7 @@ iso_protopr1(u_long kern_addr, int istp)
|
||||
}
|
||||
|
||||
void
|
||||
tp_protopr(u_long off, char *name)
|
||||
tp_protopr(u_long off, char *name, int af __unused)
|
||||
{
|
||||
extern char *tp_sstring[];
|
||||
struct tp_ref *tpr, *tpr_base;
|
||||
@ -444,7 +444,7 @@ isonetprint(struct iso_addr *iso, char *sufx, u_short sufxlen, int islocal)
|
||||
|
||||
#ifdef notdef
|
||||
static void
|
||||
x25_protopr(u_long off, char *name)
|
||||
x25_protopr(u_long off, char *name, int af __unused)
|
||||
{
|
||||
static char *xpcb_states[] = {
|
||||
"CLOSED",
|
||||
|
@ -491,25 +491,6 @@ main(argc, argv)
|
||||
mbpr(0, 0, 0, 0);
|
||||
exit(0);
|
||||
}
|
||||
if (pflag) {
|
||||
if (iflag && tp->pr_istats) {
|
||||
kread(0, 0, 0);
|
||||
intpr(interval, nl[N_IFNET].n_value, tp->pr_istats);
|
||||
exit(0);
|
||||
}
|
||||
if (!tp->pr_stats) {
|
||||
printf("%s: no stats routine\n", tp->pr_name);
|
||||
exit(0);
|
||||
}
|
||||
if (tp->pr_usesysctl) {
|
||||
(*tp->pr_stats)(tp->pr_usesysctl, tp->pr_name);
|
||||
} else {
|
||||
kread(0, 0, 0);
|
||||
(*tp->pr_stats)(nl[tp->pr_sindex].n_value,
|
||||
tp->pr_name);
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
#if 0
|
||||
/*
|
||||
* Keep file descriptors open to avoid overhead
|
||||
@ -613,7 +594,7 @@ printproto(tp, name)
|
||||
register struct protox *tp;
|
||||
char *name;
|
||||
{
|
||||
void (*pr)();
|
||||
void (*pr)(u_long, char *, int);
|
||||
u_long off;
|
||||
|
||||
if (sflag) {
|
||||
|
@ -91,8 +91,6 @@
|
||||
#define WID_ORG (lflag ? 39 : (numeric_addr ? 29 : 18)) /* width of origin column */
|
||||
#define WID_GRP (lflag ? 18 : (numeric_addr ? 16 : 18)) /* width of group column */
|
||||
|
||||
extern char *routename6 (struct sockaddr_in6 *);
|
||||
|
||||
void
|
||||
mroute6pr(u_long mfcaddr, u_long mifaddr)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ static int first = 1;
|
||||
static int csock = -1;
|
||||
|
||||
void
|
||||
netgraphprotopr(u_long off, char *name)
|
||||
netgraphprotopr(u_long off, char *name, int af __unused)
|
||||
{
|
||||
struct ngpcb *this, *next;
|
||||
struct ngpcb ngpcb;
|
||||
|
@ -64,22 +64,22 @@ char *plural (int);
|
||||
char *plurales (int);
|
||||
|
||||
void protopr (u_long, char *, int);
|
||||
void tcp_stats (u_long, char *);
|
||||
void udp_stats (u_long, char *);
|
||||
void ip_stats (u_long, char *);
|
||||
void icmp_stats (u_long, char *);
|
||||
void igmp_stats (u_long, char *);
|
||||
void tcp_stats (u_long, char *, int);
|
||||
void udp_stats (u_long, char *, int);
|
||||
void ip_stats (u_long, char *, int);
|
||||
void icmp_stats (u_long, char *, int);
|
||||
void igmp_stats (u_long, char *, int);
|
||||
#ifdef IPSEC
|
||||
void ipsec_stats (u_long, char *);
|
||||
void ipsec_stats (u_long, char *, int);
|
||||
#endif
|
||||
|
||||
#ifdef INET6
|
||||
void ip6_stats (u_long, char *);
|
||||
void ip6_stats (u_long, char *, int);
|
||||
void ip6_ifstats (char *);
|
||||
void icmp6_stats (u_long, char *);
|
||||
void icmp6_stats (u_long, char *, int);
|
||||
void icmp6_ifstats (char *);
|
||||
void pim6_stats (u_long, char *);
|
||||
void rip6_stats (u_long, char *);
|
||||
void pim6_stats (u_long, char *, int);
|
||||
void rip6_stats (u_long, char *, int);
|
||||
void mroute6pr (u_long, u_long);
|
||||
void mrt6_stats (u_long);
|
||||
|
||||
@ -90,10 +90,10 @@ char *netname6 (struct sockaddr_in6 *, struct in6_addr *);
|
||||
#endif /*INET6*/
|
||||
|
||||
#ifdef IPSEC
|
||||
void pfkey_stats (u_long, char *);
|
||||
void pfkey_stats (u_long, char *, int);
|
||||
#endif
|
||||
|
||||
void bdg_stats (u_long, char *);
|
||||
void bdg_stats (u_long, char *, int);
|
||||
|
||||
void mbpr (u_long, u_long, u_long, u_long);
|
||||
|
||||
@ -118,29 +118,29 @@ char *ipx_print (struct sockaddr *);
|
||||
char *ns_print (struct sockaddr *);
|
||||
void routepr (u_long);
|
||||
|
||||
void ipxprotopr (u_long, char *);
|
||||
void spx_stats (u_long, char *);
|
||||
void ipx_stats (u_long, char *);
|
||||
void ipxerr_stats (u_long, char *);
|
||||
void ipxprotopr (u_long, char *, int);
|
||||
void spx_stats (u_long, char *, int);
|
||||
void ipx_stats (u_long, char *, int);
|
||||
void ipxerr_stats (u_long, char *, int);
|
||||
|
||||
void nsprotopr (u_long, char *);
|
||||
void spp_stats (u_long, char *);
|
||||
void idp_stats (u_long, char *);
|
||||
void nserr_stats (u_long, char *);
|
||||
void nsprotopr (u_long, char *, int);
|
||||
void spp_stats (u_long, char *, int);
|
||||
void idp_stats (u_long, char *, int);
|
||||
void nserr_stats (u_long, char *, int);
|
||||
|
||||
void atalkprotopr (u_long, char *);
|
||||
void ddp_stats (u_long, char *);
|
||||
void atalkprotopr (u_long, char *, int);
|
||||
void ddp_stats (u_long, char *, int);
|
||||
|
||||
void netgraphprotopr (u_long, char *);
|
||||
void netgraphprotopr (u_long, char *, int);
|
||||
|
||||
void unixpr (void);
|
||||
|
||||
void esis_stats (u_long, char *);
|
||||
void clnp_stats (u_long, char *);
|
||||
void cltp_stats (u_long, char *);
|
||||
void iso_protopr (u_long, char *);
|
||||
void esis_stats (u_long, char *, int);
|
||||
void clnp_stats (u_long, char *, int);
|
||||
void cltp_stats (u_long, char *, int);
|
||||
void iso_protopr (u_long, char *, int);
|
||||
void iso_protopr1 (u_long, int);
|
||||
void tp_protopr (u_long, char *);
|
||||
void tp_protopr (u_long, char *, int);
|
||||
void tp_inproto (u_long);
|
||||
void tp_stats (caddr_t, caddr_t);
|
||||
|
||||
|
@ -85,7 +85,7 @@ static int first = 1;
|
||||
*/
|
||||
|
||||
void
|
||||
nsprotopr(u_long off, char *name)
|
||||
nsprotopr(u_long off, char *name, int af __unused)
|
||||
{
|
||||
struct nspcb cb;
|
||||
register struct nspcb *prev, *next;
|
||||
@ -158,7 +158,7 @@ nsprotopr(u_long off, char *name)
|
||||
* Dump SPP statistics structure.
|
||||
*/
|
||||
void
|
||||
spp_stats(u_long off, char *name)
|
||||
spp_stats(u_long off, char *name, int af __unused)
|
||||
{
|
||||
struct spp_istat spp_istat;
|
||||
#define sppstat spp_istat.newstats
|
||||
@ -234,7 +234,7 @@ spp_stats(u_long off, char *name)
|
||||
* Dump IDP statistics structure.
|
||||
*/
|
||||
void
|
||||
idp_stats(u_long off, char *name)
|
||||
idp_stats(u_long off, char *name, int af __unused)
|
||||
{
|
||||
struct idpstat idpstat;
|
||||
|
||||
@ -268,7 +268,7 @@ static struct {
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
nserr_stats(u_long off, char *name)
|
||||
nserr_stats(u_long off, char *name, int af __unused)
|
||||
{
|
||||
struct ns_errstat ns_errstat;
|
||||
register int j;
|
||||
|
@ -135,11 +135,6 @@ static void p_rtentry (struct rtentry *);
|
||||
static u_long forgemask (u_long);
|
||||
static void domask (char *, u_long, u_long);
|
||||
|
||||
#ifdef INET6
|
||||
char *routename6 (struct sockaddr_in6 *);
|
||||
char *netname6 (struct sockaddr_in6 *, struct in6_addr *);
|
||||
#endif /*INET6*/
|
||||
|
||||
/*
|
||||
* Print routing tables.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user