From owner-svn-src-head@freebsd.org Tue Jun 19 20:23:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AF27100C7E4; Tue, 19 Jun 2018 20:23:28 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BD06745D8; Tue, 19 Jun 2018 20:23:27 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w5JKNNKE071164; Tue, 19 Jun 2018 13:23:23 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w5JKNNfe071163; Tue, 19 Jun 2018 13:23:23 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201806192023.w5JKNNfe071163@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r335379 - head/sys/contrib/libnv In-Reply-To: <201806191809.w5JI9F2P031310@repo.freebsd.org> To: Sean Bruno Date: Tue, 19 Jun 2018 13:23:23 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2018 20:23:28 -0000 > Author: sbruno > Date: Tue Jun 19 18:09:15 2018 > New Revision: 335379 > URL: https://svnweb.freebsd.org/changeset/base/335379 > > Log: > Set prev to NULL so its garaunteed to have a value of some kind and > gcc doesn't explode. Feel free to fix this correctly or whatever for > gcc builds. > > This *should* quiesce tinderbox after r335347 for the gcc builds. > > Modified: > head/sys/contrib/libnv/nvpair.c > > Modified: head/sys/contrib/libnv/nvpair.c > ============================================================================== > --- head/sys/contrib/libnv/nvpair.c Tue Jun 19 17:41:46 2018 (r335378) > +++ head/sys/contrib/libnv/nvpair.c Tue Jun 19 18:09:15 2018 (r335379) > @@ -1979,7 +1979,7 @@ int > nvpair_append_nvlist_array(nvpair_t *nvp, const nvlist_t *value) > { > nvpair_t *tmpnvp; > - nvlist_t *nvl, *prev; > + nvlist_t *nvl, *prev = NULL; Please please please mark these so that people *can* at some time know that this was 1) done to quiet some compiler, and 2) fix it properly so all things are quiet about it. - nvlist_t *nvl, *prev; + nvlist_t *nvl; + nvlist_t *prev = NULL; /* Quiet gcc foo.bar XXX */ > int flags; > Or even less intrusive would of been to put this one line add in leaving the declarations untouched. I think this would be the prefered mothod for these types of things. + *prev = NULL; /* Quiet gcc foo.bar XXX */ > NVPAIR_ASSERT(nvp); > Thanks, -- Rod Grimes rgrimes@freebsd.org