diff options
author | araujo <araujo@FreeBSD.org> | 2016-01-08 02:58:10 +0000 |
---|---|---|
committer | araujo <araujo@FreeBSD.org> | 2016-01-08 02:58:10 +0000 |
commit | 9f419b5317a16ffb5a8e65dd2a5fed5fd25582c6 (patch) | |
tree | 9c88b8482c0457c02bed865c6e8a60698b6417f8 /sys/net | |
parent | f6284c5ff8e291faed44048959162d22eddd705c (diff) | |
download | FreeBSD-src-9f419b5317a16ffb5a8e65dd2a5fed5fd25582c6.zip FreeBSD-src-9f419b5317a16ffb5a8e65dd2a5fed5fd25582c6.tar.gz |
MFC: r292972
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
Approved by: rodrigc (mentor)
Sponsored by: gandi.net
Differential Revision: https://reviews.freebsd.org/D4775
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_gre.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 17a324c..bad9dd5 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -682,7 +682,10 @@ gre_input(struct mbuf **mp, int *offp, int proto) 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,27 @@ gre_input(struct mbuf **mp, int *offp, int proto) 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)) { |