From dc70efcef725eda1d8fd3e9ef5c7a6a1656c9a84 Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Tue, 10 Jan 2012 02:59:01 +0000 Subject: [PATCH] Fix warning when compiling with gcc46: error: variable 'origextlen' set but not used Approved by: dim MFC after: 3 days --- sbin/ping6/ping6.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c index a49ed5d814bf..711561ebb9ac 100644 --- a/sbin/ping6/ping6.c +++ b/sbin/ping6/ping6.c @@ -1812,7 +1812,7 @@ pr_ip6opt(void *extbuf, size_t bufsize) struct ip6_hbh *ext; int currentlen; u_int8_t type; - socklen_t extlen, len, origextlen; + socklen_t extlen, len; void *databuf; size_t offset; u_int16_t value2; @@ -1828,7 +1828,6 @@ pr_ip6opt(void *extbuf, size_t bufsize) * subtract the size of a cmsg structure from the buffer size. */ if (bufsize < (extlen + CMSG_SPACE(0))) { - origextlen = extlen; extlen = bufsize - CMSG_SPACE(0); warnx("options truncated, showing only %u (total=%u)", (unsigned int)(extlen / 8 - 1),