Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Dec 2015 02:01:21 +0000 (UTC)
From:      Marcelo Araujo <araujo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r292972 - head/sys/net
Message-ID:  <201512310201.tBV21L0C004893@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: araujo
Date: Thu Dec 31 02:01:20 2015
New Revision: 292972
URL: https://svnweb.freebsd.org/changeset/base/292972

Log:
  Wrap using #ifdef 'notyet' those variables and statements not yet
  implemented to lower the compiler warnings.
  
  It fix the case of unused-but-set-variable spotted by gcc4.9.
  
  Reviewed by:	ngie, ae
  Approved by:	bapt (mentor)
  Differential Revision:	https://reviews.freebsd.org/D4720

Modified:
  head/sys/net/if_gre.c

Modified: head/sys/net/if_gre.c
==============================================================================
--- head/sys/net/if_gre.c	Thu Dec 31 01:57:55 2015	(r292971)
+++ head/sys/net/if_gre.c	Thu Dec 31 02:01:20 2015	(r292972)
@@ -682,7 +682,10 @@ gre_input(struct mbuf **mp, int *offp, i
 	struct grehdr *gh;
 	struct ifnet *ifp;
 	struct mbuf *m;
-	uint32_t *opts, key;
+	uint32_t *opts;
+#ifdef notyet
+	uint32_t key;
+#endif
 	uint16_t flags;
 	int hlen, isr, af;
 
@@ -715,17 +718,28 @@ gre_input(struct mbuf **mp, int *offp, i
 		opts++;
 	}
 	if (flags & GRE_FLAGS_KP) {
+#ifdef notyet
+        /* 
+         * XXX: The current implementation uses the key only for outgoing
+         * packets. But we can check the key value here, or even in the
+         * encapcheck function.
+         */
 		key = ntohl(*opts);
+#endif
 		hlen += sizeof(uint32_t);
 		opts++;
+    }
+#ifdef notyet
 	} else
 		key = 0;
-	/*
+
 	if (sc->gre_key != 0 && (key != sc->gre_key || key != 0))
 		goto drop;
-	*/
+#endif
 	if (flags & GRE_FLAGS_SP) {
-		/* seq = ntohl(*opts); */
+#ifdef notyet
+		seq = ntohl(*opts);
+#endif
 		hlen += sizeof(uint32_t);
 	}
 	switch (ntohs(gh->gre_proto)) {



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