summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormelifaro <melifaro@FreeBSD.org>2014-10-04 13:57:14 +0000
committermelifaro <melifaro@FreeBSD.org>2014-10-04 13:57:14 +0000
commit1e90e104a024e339c46de677d3823af61a5a59b2 (patch)
treeee1bee820c9882f8c1260a6f598a5a36b1199cc0
parentf063418bd71a3328b12e6b720dbdf9b69db98e7f (diff)
downloadFreeBSD-src-1e90e104a024e339c46de677d3823af61a5a59b2.zip
FreeBSD-src-1e90e104a024e339c46de677d3823af61a5a59b2.tar.gz
Fix build with gcc.
-rw-r--r--sys/netpfil/ipfw/ip_fw_table.c1
-rw-r--r--sys/netpfil/ipfw/ip_fw_table_algo.c13
-rw-r--r--sys/netpfil/ipfw/ip_fw_table_value.c1
3 files changed, 9 insertions, 6 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_table.c b/sys/netpfil/ipfw/ip_fw_table.c
index bc0a771..f2f56fd 100644
--- a/sys/netpfil/ipfw/ip_fw_table.c
+++ b/sys/netpfil/ipfw/ip_fw_table.c
@@ -556,6 +556,7 @@ add_table_entry(struct ip_fw_chain *ch, struct tid_info *ti,
caddr_t ta_buf_m, v;
memset(&ts, 0, sizeof(ts));
+ ta = NULL;
IPFW_UH_WLOCK(ch);
/*
diff --git a/sys/netpfil/ipfw/ip_fw_table_algo.c b/sys/netpfil/ipfw/ip_fw_table_algo.c
index e201b81..8165428 100644
--- a/sys/netpfil/ipfw/ip_fw_table_algo.c
+++ b/sys/netpfil/ipfw/ip_fw_table_algo.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD: projects/ipfw/sys/netpfil/ipfw/ip_fw_table.c 267384 2014-06-
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/rwlock.h>
+#include <sys/rmlock.h>
#include <sys/socket.h>
#include <sys/queue.h>
#include <net/if.h> /* ip_fw.h requires IFNAMSIZ */
@@ -1819,11 +1820,11 @@ static void if_notifier(struct ip_fw_chain *ch, void *cbdata, uint16_t ifindex);
int
compare_ifidx(const void *k, const void *v)
{
- struct ifidx *ifidx;
+ const struct ifidx *ifidx;
uint16_t key;
- key = *((uint16_t *)k);
- ifidx = (struct ifidx *)v;
+ key = *((const uint16_t *)k);
+ ifidx = (const struct ifidx *)v;
if (key < ifidx->kidx)
return (-1);
@@ -2484,11 +2485,11 @@ int compare_numarray(const void *k, const void *v);
int
compare_numarray(const void *k, const void *v)
{
- struct numarray *na;
+ const struct numarray *na;
uint32_t key;
- key = *((uint32_t *)k);
- na = (struct numarray *)v;
+ key = *((const uint32_t *)k);
+ na = (const struct numarray *)v;
if (key < na->number)
return (-1);
diff --git a/sys/netpfil/ipfw/ip_fw_table_value.c b/sys/netpfil/ipfw/ip_fw_table_value.c
index 65972f3..22a9cfd 100644
--- a/sys/netpfil/ipfw/ip_fw_table_value.c
+++ b/sys/netpfil/ipfw/ip_fw_table_value.c
@@ -490,6 +490,7 @@ ipfw_link_table_values(struct ip_fw_chain *ch, struct tableop_state *ts)
error = 0;
found = 0;
vlimit = ts->ta->vlimit;
+ vidx = 0;
tc = ts->tc;
tei = ts->tei;
count = ts->count;
OpenPOWER on IntegriCloud