Date: Sun, 13 Dec 2015 12:58:10 -0600 From: Benjamin Kaduk <bjkfbsd@gmail.com> To: Dimitry Andric <dim@freebsd.org> Cc: Kai Wang <kaiw27@gmail.com>, Adrian Chadd <adrian.chadd@gmail.com>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, Ed Maste <emaste@freebsd.org> Subject: Re: svn commit: r292120 - in head/contrib/elftoolchain: addr2line common elfcopy libelf readelf Message-ID: <CAJ5_RoBoRFw2SJ1Dv1XBEHnr=vcaiivMVQh-UbD7tmV4f__q8Q@mail.gmail.com> In-Reply-To: <54DEE8D2-6ED9-42D4-B480-299C23CB2D66@FreeBSD.org> References: <201512112028.tBBKSRtn092966@repo.freebsd.org> <CAJ-VmomX%2BSYUwMpWkTiXMqAhQE%2BthmaMse7KnTFXWqc4JpXmPA@mail.gmail.com> <CAMf2Fe7AK5K99nrUE4Rx7Zp6PKD%2Bg-LAqZzJLRJO1GdgEqS7yQ@mail.gmail.com> <54DEE8D2-6ED9-42D4-B480-299C23CB2D66@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Dec 13, 2015 at 3:13 AM, Dimitry Andric <dim@freebsd.org> wrote: > On 13 Dec 2015, at 09:43, Kai Wang <kaiw27@gmail.com> wrote: > > > > 2015-12-13 7:04 GMT+01:00 Adrian Chadd <adrian.chadd@gmail.com>: > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ5_RoBoRFw2SJ1Dv1XBEHnr=vcaiivMVQh-UbD7tmV4f__q8Q>