Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Aug 2019 15:55:01 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r351080 - head/sbin/ping6
Message-ID:  <201908151555.x7FFt1l9084556@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Thu Aug 15 15:55:01 2019
New Revision: 351080
URL: https://svnweb.freebsd.org/changeset/base/351080

Log:
  ping6: quiet an undefined variable warning
  
  GCC 4.2 isn't smart enough to know that this variable is already defined by
  the time it's used.
  
  Submitted by:	Ján Sučan <sucanjan@gmail.com>
  MFC after:	2 weeks
  Sponsored by:	Google, inc. (Google Summer of Code 2019)
  Differential Revision:	https://reviews.freebsd.org/D21269

Modified:
  head/sbin/ping6/ping6.c

Modified: head/sbin/ping6/ping6.c
==============================================================================
--- head/sbin/ping6/ping6.c	Thu Aug 15 15:49:01 2019	(r351079)
+++ head/sbin/ping6/ping6.c	Thu Aug 15 15:55:01 2019	(r351080)
@@ -2082,7 +2082,7 @@ pr_nodeaddr(struct icmp6_nodeinfo *ni, int nilen)
 	if (nilen % (sizeof(u_int32_t) + sizeof(struct in6_addr)) == 0)
 		withttl = 1;
 	while (nilen > 0) {
-		u_int32_t ttl;
+		u_int32_t ttl = 0;
 
 		if (withttl) {
 			/* XXX: alignment? */



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