Kick WARNS level up to 6 by fixing various trivial warnings.

This commit is contained in:
Poul-Henning Kamp 2009-04-05 14:15:05 +00:00
parent 38ae65235e
commit 9940236ef3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190712
6 changed files with 10 additions and 9 deletions

View File

@ -7,6 +7,6 @@ MAN= routed.8
SUBDIR= rtquery
LDADD= -lmd
DPADD= ${LIBMD}
WARNS?= 0
WARNS?= 6
.include <bsd.prog.mk>

View File

@ -955,7 +955,8 @@ ifinit(void)
trace_act("interface %s has been off"
" %ld seconds; forget it",
ifp->int_name,
now.tv_sec-ifp->int_data.ts);
(long)now.tv_sec-
ifp->int_data.ts);
ifdel(ifp);
}
continue;

View File

@ -139,7 +139,7 @@ output(enum output_type type,
flags = MSG_DONTROUTE;
break;
case OUT_MULTICAST:
if (ifp->int_if_flags & (IFF_POINTOPOINT|IFF_MULTICAST) ==
if ((ifp->int_if_flags & (IFF_POINTOPOINT|IFF_MULTICAST)) ==
IFF_POINTOPOINT) {
msg = "Send pt-to-pt";
} else if (ifp->int_state & IS_DUP) {

View File

@ -846,7 +846,7 @@ rn_walktree(struct radix_node_head *h,
}
int
rn_inithead(void **head, int off)
rn_inithead(struct radix_node_head **head, int off)
{
struct radix_node_head *rnh;
struct radix_node *t, *tt, *ttt;
@ -887,7 +887,7 @@ rn_init(void)
addmask_key = cplim = rn_ones + max_keylen;
while (cp < cplim)
*cp++ = -1;
if (rn_inithead((void **)&mask_rnhead, 0) == 0)
if (rn_inithead(&mask_rnhead, 0) == 0)
panic("rn_init 2");
}

View File

@ -138,7 +138,7 @@ struct radix_node_head {
#define Free(p) free((void *)p);
void rn_init(void);
int rn_inithead(void **, int);
int rn_inithead(struct radix_node_head **head, int off);
int rn_refines(void *, void *);
int rn_walktree(struct radix_node_head *,
int (*)(struct radix_node *, struct walkarg *),

View File

@ -1631,7 +1631,7 @@ rtinit(void)
/* Initialize the radix trees */
max_keylen = sizeof(struct sockaddr_in);
rn_init();
rn_inithead((void**)&rhead, 32);
rn_inithead(&rhead, 32);
/* mark all of the slots in the table free */
ag_avail = ag_slots;
@ -2124,8 +2124,8 @@ age(naddr bad_gate)
" %ld:%ld",
ifp->int_name,
naddr_ntoa(ifp->int_dstaddr),
(now.tv_sec - ifp->int_act_time)/60,
(now.tv_sec - ifp->int_act_time)%60);
(long)(now.tv_sec - ifp->int_act_time)/60,
(long)(now.tv_sec - ifp->int_act_time)%60);
if_sick(ifp);
}