diff options
author | phk <phk@FreeBSD.org> | 2009-04-05 14:15:05 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2009-04-05 14:15:05 +0000 |
commit | ab2775f3db00244b047f362ba89ba36865f7a02a (patch) | |
tree | 5c07af6065ffcb207aa355abdb2bc53123209ccd /sbin/routed | |
parent | 8c0066c04042edc19879610fab48e9dbde8014c5 (diff) | |
download | FreeBSD-src-ab2775f3db00244b047f362ba89ba36865f7a02a.zip FreeBSD-src-ab2775f3db00244b047f362ba89ba36865f7a02a.tar.gz |
Kick WARNS level up to 6 by fixing various trivial warnings.
Diffstat (limited to 'sbin/routed')
-rw-r--r-- | sbin/routed/Makefile | 2 | ||||
-rw-r--r-- | sbin/routed/if.c | 3 | ||||
-rw-r--r-- | sbin/routed/output.c | 2 | ||||
-rw-r--r-- | sbin/routed/radix.c | 4 | ||||
-rw-r--r-- | sbin/routed/radix.h | 2 | ||||
-rw-r--r-- | sbin/routed/table.c | 6 |
6 files changed, 10 insertions, 9 deletions
diff --git a/sbin/routed/Makefile b/sbin/routed/Makefile index 1ac16c4..c4abdba 100644 --- a/sbin/routed/Makefile +++ b/sbin/routed/Makefile @@ -7,6 +7,6 @@ MAN= routed.8 SUBDIR= rtquery LDADD= -lmd DPADD= ${LIBMD} -WARNS?= 0 +WARNS?= 6 .include <bsd.prog.mk> diff --git a/sbin/routed/if.c b/sbin/routed/if.c index 77277d9..0f6f83a 100644 --- a/sbin/routed/if.c +++ b/sbin/routed/if.c @@ -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; diff --git a/sbin/routed/output.c b/sbin/routed/output.c index f89db5d..dd4f1a9 100644 --- a/sbin/routed/output.c +++ b/sbin/routed/output.c @@ -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) { diff --git a/sbin/routed/radix.c b/sbin/routed/radix.c index 7f37688..a805d43 100644 --- a/sbin/routed/radix.c +++ b/sbin/routed/radix.c @@ -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"); } diff --git a/sbin/routed/radix.h b/sbin/routed/radix.h index 6cf196f..4558e87 100644 --- a/sbin/routed/radix.h +++ b/sbin/routed/radix.h @@ -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 *), diff --git a/sbin/routed/table.c b/sbin/routed/table.c index 7e30ebd1..33f8332 100644 --- a/sbin/routed/table.c +++ b/sbin/routed/table.c @@ -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); } |