From owner-svn-src-all@freebsd.org Sun Dec 13 18:58:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24532A42B5B; Sun, 13 Dec 2015 18:58:13 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C50FA1940; Sun, 13 Dec 2015 18:58:12 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-wm0-x234.google.com with SMTP id p66so35077401wmp.1; Sun, 13 Dec 2015 10:58:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=0T7haAj3VeHQMDgMK0IgWycJqnE5S3JMHI98N34zVpk=; b=uc/Y2g+pbzuP2ypxhpk9noIuRlceQNWg4Yf8U1Nof/csz7L+we+GW/OWHz/X7QayBY 4wl1I4x1ZDWcOHhBYBA/yeE2pGwNd1G9neNS6O/9z5i2ofe/K08Zm5OKVGGtKxhRfGD0 3goXFYfVH1q2+oQJCOIoIHwvzjAn4SlrUdDJPVVzpb2WpGiM/4x3yE0/aWYB+VjVeqPJ ReKjB5TcyQF3Dq7Mhw4TUPMAsMycNW/LXHu4LOUSgQZmdrWcqhmilhYHR5U9u/X5kohz Sf97rT2piEz19p+4x35ybwD1YpbIIHXswnP4TAAy0/g5l6QgoeIdAh+6HfTSxW4zfFYl C2nQ== MIME-Version: 1.0 X-Received: by 10.28.60.11 with SMTP id j11mr19061675wma.57.1450033090517; Sun, 13 Dec 2015 10:58:10 -0800 (PST) Received: by 10.27.170.79 with HTTP; Sun, 13 Dec 2015 10:58:10 -0800 (PST) In-Reply-To: <54DEE8D2-6ED9-42D4-B480-299C23CB2D66@FreeBSD.org> References: <201512112028.tBBKSRtn092966@repo.freebsd.org> <54DEE8D2-6ED9-42D4-B480-299C23CB2D66@FreeBSD.org> Date: Sun, 13 Dec 2015 12:58:10 -0600 Message-ID: Subject: Re: svn commit: r292120 - in head/contrib/elftoolchain: addr2line common elfcopy libelf readelf From: Benjamin Kaduk To: Dimitry Andric Cc: Kai Wang , Adrian Chadd , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ed Maste Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Dec 2015 18:58:13 -0000 On Sun, Dec 13, 2015 at 3:13 AM, Dimitry Andric wrote: > On 13 Dec 2015, at 09:43, Kai Wang wrote: > > > > 2015-12-13 7:04 GMT+01:00 Adrian Chadd : > > cc1: warnings being treated as errors > > > /usr/home/adrian/work/freebsd/head-embedded/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c: > > In function 'dump_dwarf': > > > /usr/home/adrian/work/freebsd/head-embedded/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:7479: > > warning: 'b' may be used uninitialized in this function > > > /usr/home/adrian/work/freebsd/head-embedded/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:7479: > > note: 'b' was declared here > > > /usr/home/adrian/work/freebsd/head-embedded/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:4758: > > warning: 'pe' may be used uninitialized in this function > > > /usr/home/adrian/work/freebsd/head-embedded/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:4758: > > note: 'pe' was declared here > > > > .. these both seem like legit. > > > > > > Hi, > > > > Sorry about the breakage. Should be fixed by r292158. > > Somehow clang didn't catch this. Had to use gcc to see this warning. > > Indeed, this is interesting. For clang to warn similarly, the > -Wconditional-uninitialized option has to be enabled explicitly, and > then you get a lot of them (this is from just before your commit): > > /usr/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:4861:33: > error: variable 'pe' may be uninitialized when used here > [-Werror,-Wconditional-uninitialized] > dirndx = _decode_uleb128(&p, pe); > [...] > I'll check if there is a specific reason upstream does not enable this > warning by default for -Wall. Maybe there is a risk of false positives. > > -Dimitry > > I'm pretty sure I've seen lots of false positives from -Wconditional-uninitialized in the krb5 and openafs codebases. I either set -Wno-error=conditional-uninitialized or -Wno-conditional-uninitialized depending on how distracting they are in my build logs. -Ben