From owner-cvs-src@FreeBSD.ORG Fri Apr 4 02:55:05 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CC0837B401; Fri, 4 Apr 2003 02:55:05 -0800 (PST) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA3B543F85; Fri, 4 Apr 2003 02:54:57 -0800 (PST) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) h34Asigg022343 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Apr 2003 13:54:44 +0300 (EEST) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.9/8.12.8/Submit) id h34AsXbr022317; Fri, 4 Apr 2003 13:54:33 +0300 (EEST) (envelope-from ru) Date: Fri, 4 Apr 2003 13:54:33 +0300 From: Ruslan Ermilov To: Bruce Evans Message-ID: <20030404105433.GB14607@sunbay.com> References: <200304030513.h335DR60079544@repoman.freebsd.org> <20030402231638.A81523@FreeBSD.org> <20030403055049.GA67232@dhcp01.pn.xcllnt.net> <20030403180026.A29934@gamplex.bde.org> <20030403085350.GA37174@sunbay.com> <20030403155917.GC17860@dragon.nuxi.com> <20030404200159.J33842@gamplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="V0207lvV8h4k8FAm" Content-Disposition: inline In-Reply-To: <20030404200159.J33842@gamplex.bde.org> User-Agent: Mutt/1.5.4i cc: src-committers@FreeBSD.org cc: David O'Brien cc: Juli Mallett cc: cvs-src@FreeBSD.org cc: cvs-all@FreeBSD.org cc: Marcel Moolenaar Subject: Re: cvs commit: src/libexec/talkd announce.c extern.h print.c table.c talkd.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2003 10:55:06 -0000 --V0207lvV8h4k8FAm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 04, 2003 at 08:10:34PM +1000, Bruce Evans wrote: > On Thu, 3 Apr 2003, David O'Brien wrote: >=20 > > On Thu, Apr 03, 2003 at 11:53:50AM +0300, Ruslan Ermilov wrote: > > > -. if ${WARNS} > 4 > > > +. if ${WARNS} > 4 && !empty(CFLAGS:M-O*) && empty(CFLAGS:M-O0) > > > CFLAGS +=3D -Wuninitialized > > > . endif > > > > Why not just get rid of it totally? We have this already: >=20 > It's too useful to remove totally. >=20 > > . if ${WARNS} > 1 && ${WARNS} < 5 > > # XXX Delete -Wuninitialized by default for now -- the compiler doe= sn't > > # XXX always get it right. > > CFLAGS +=3D -Wno-uninitialized > > . endif > > > > so we already know it is problematic. OR rather than use: > > > > . if ${WARNS} > 4 > > CFLAGS +=3D -Wuninitialized > > . endif > > > > use > > > > . if ${WARNS} =3D=3D 4 > > CFLAGS +=3D -Wuninitialized > > . endif >=20 > Add -Wno-uninitialized to cancel -Wuninitialized being part of -Wall as > necessary, i.e., if -Wall is added (${WARNS} > 1) but -O is not in ${CFLA= GS}. > Don't add it or change WARNS settings back and forth to work around bitrot > from -Wuninitialized not being turned off for so long. Don't change sour= ces > "to keep gcc happy". >=20 I've just committed a superior fix. :-) The story is that if have -O, then -Wall (that is true for WARNS > 1) will add -Wuninitialized for you automatically, so there was no point in adding it explicitly in rev. 1.7. : $ make clean; env CFLAGS=3D"-O -pipe" make WARNS=3D5 a.o : rm -f a a.o : cc -O -pipe -march=3Dpentiumpro -Wsystem-headers -Werror -Wall -Wno-for= mat-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wretur= n-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -c a.c : cc1: warnings being treated as errors : a.c: In function `main': : a.c:6: warning: `a' might be used uninitialized in this function : *** Error code 1 : $ make clean; env CFLAGS=3D"-pipe" make WARNS=3D5 a.o : rm -f a a.o : cc -pipe -march=3Dpentiumpro -Wsystem-headers -Werror -Wall -Wno-format= -y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-t= ype -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -c a.c And just to demonstrate that things don't depend on the options order: : $ make clean; env CFLAGS=3D"-O -Wall -pipe -O0" make WARNS=3D5 a.o : rm -f a a.o : cc -O -Wall -pipe -O0 -march=3Dpentiumpro -Wsystem-headers -Werror -Wal= l -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-ari= th -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align= -c a.c Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --V0207lvV8h4k8FAm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+jWRpUkv4P6juNwoRApLrAJ40AsFhHLHstJ8ezT4nJkWRLViKzwCbBonV MOgdPF43zqe7aEkJvAO2udc= =EwOW -----END PGP SIGNATURE----- --V0207lvV8h4k8FAm--