Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Oct 2014 13:57:15 +0000 (UTC)
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r272521 - projects/ipfw/sys/netpfil/ipfw
Message-ID:  <201410041357.s94DvFFG064375@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: melifaro
Date: Sat Oct  4 13:57:14 2014
New Revision: 272521
URL: https://svnweb.freebsd.org/changeset/base/272521

Log:
  Fix build with gcc.

Modified:
  projects/ipfw/sys/netpfil/ipfw/ip_fw_table.c
  projects/ipfw/sys/netpfil/ipfw/ip_fw_table_algo.c
  projects/ipfw/sys/netpfil/ipfw/ip_fw_table_value.c

Modified: projects/ipfw/sys/netpfil/ipfw/ip_fw_table.c
==============================================================================
--- projects/ipfw/sys/netpfil/ipfw/ip_fw_table.c	Sat Oct  4 13:46:10 2014	(r272520)
+++ projects/ipfw/sys/netpfil/ipfw/ip_fw_table.c	Sat Oct  4 13:57:14 2014	(r272521)
@@ -556,6 +556,7 @@ add_table_entry(struct ip_fw_chain *ch, 
 	caddr_t ta_buf_m, v;
 
 	memset(&ts, 0, sizeof(ts));
+	ta = NULL;
 	IPFW_UH_WLOCK(ch);
 
 	/*

Modified: projects/ipfw/sys/netpfil/ipfw/ip_fw_table_algo.c
==============================================================================
--- projects/ipfw/sys/netpfil/ipfw/ip_fw_table_algo.c	Sat Oct  4 13:46:10 2014	(r272520)
+++ projects/ipfw/sys/netpfil/ipfw/ip_fw_table_algo.c	Sat Oct  4 13:57:14 2014	(r272521)
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD: projects/ipfw/sys/ne
 #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_cha
 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, cons
 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);

Modified: projects/ipfw/sys/netpfil/ipfw/ip_fw_table_value.c
==============================================================================
--- projects/ipfw/sys/netpfil/ipfw/ip_fw_table_value.c	Sat Oct  4 13:46:10 2014	(r272520)
+++ projects/ipfw/sys/netpfil/ipfw/ip_fw_table_value.c	Sat Oct  4 13:57:14 2014	(r272521)
@@ -490,6 +490,7 @@ ipfw_link_table_values(struct ip_fw_chai
 	error = 0;
 	found = 0;
 	vlimit = ts->ta->vlimit;
+	vidx = 0;
 	tc = ts->tc;
 	tei = ts->tei;
 	count = ts->count;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410041357.s94DvFFG064375>