diff options
author | luigi <luigi@FreeBSD.org> | 2016-01-26 23:37:07 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2016-01-26 23:37:07 +0000 |
commit | 156e03004c23e540f5680a1ae0c57e55cc26cf05 (patch) | |
tree | 66694387610b758f58a4fbea1158283a10c9eb74 /sys/netpfil | |
parent | 5e7533603b9c96251039bf574fbaff037ebb2d8b (diff) | |
download | FreeBSD-src-156e03004c23e540f5680a1ae0c57e55cc26cf05.zip FreeBSD-src-156e03004c23e540f5680a1ae0c57e55cc26cf05.tar.gz |
fix various warnings to compile the test code with -Wextra
Diffstat (limited to 'sys/netpfil')
-rw-r--r-- | sys/netpfil/ipfw/test/Makefile | 2 | ||||
-rw-r--r-- | sys/netpfil/ipfw/test/main.c | 4 | ||||
-rw-r--r-- | sys/netpfil/ipfw/test/test_dn_sched.c | 6 |
3 files changed, 9 insertions, 3 deletions
diff --git a/sys/netpfil/ipfw/test/Makefile b/sys/netpfil/ipfw/test/Makefile index c556a4b..529306e 100644 --- a/sys/netpfil/ipfw/test/Makefile +++ b/sys/netpfil/ipfw/test/Makefile @@ -20,7 +20,7 @@ HEAP_OBJS=$(HEAP_SRCS:.c=.o) VPATH= .:.. -CFLAGS = -I.. -I. -Wall -Werror -O3 -DIPFW +CFLAGS = -I.. -I. -Wall -Werror -O3 -DIPFW -Wextra TARGETS= test_sched # no test_heap by default all: $(TARGETS) diff --git a/sys/netpfil/ipfw/test/main.c b/sys/netpfil/ipfw/test/main.c index ce86f49..0dd575c 100644 --- a/sys/netpfil/ipfw/test/main.c +++ b/sys/netpfil/ipfw/test/main.c @@ -594,9 +594,9 @@ controller(struct cfg_s *c) int flow_id; /* histeresis between max and min */ - if (c->state == 0 && c->pending >= c->th_max) + if (c->state == 0 && c->pending >= (uint32_t)c->th_max) c->state = 1; - else if (c->state == 1 && c->pending <= c->th_min) + else if (c->state == 1 && c->pending <= (uint32_t)c->th_min) c->state = 0; ND(1, "state %d pending %2d", c->state, c->pending); c->can_dequeue = c->state; diff --git a/sys/netpfil/ipfw/test/test_dn_sched.c b/sys/netpfil/ipfw/test/test_dn_sched.c index ee46c95..2fcc310 100644 --- a/sys/netpfil/ipfw/test/test_dn_sched.c +++ b/sys/netpfil/ipfw/test/test_dn_sched.c @@ -15,6 +15,9 @@ m_freem(struct mbuf *m) int dn_sched_modevent(module_t mod, int cmd, void *arg) { + (void)mod; + (void)cmd; + (void)arg; return 0; } @@ -32,6 +35,8 @@ int dn_delete_queue(void *_q, void *do_free) { struct dn_queue *q = _q; + + (void)do_free; if (q->mq.head) dn_free_pkts(q->mq.head); free(q); @@ -66,6 +71,7 @@ drop: int ipdn_bound_var(int *v, int dflt, int lo, int hi, const char *msg) { + (void)msg; if (*v < lo) { *v = dflt; } else if (*v > hi) { |