WARNS=6 compliance

This commit is contained in:
charnier 2013-02-19 13:17:16 +00:00
parent ed1bf36a9b
commit 8f92a0e983
6 changed files with 10 additions and 11 deletions

View File

@ -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;

View File

@ -335,7 +335,7 @@ static const char *ip6nh[] = {
"#255",
};
static char *srcrule_str[] = {
static const char *srcrule_str[] = {
"first candidate",
"same address",
"appropriate scope",

View File

@ -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;

View File

@ -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 },

View File

@ -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";

View File

@ -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);