From owner-cvs-src@FreeBSD.ORG Thu Apr 3 07:20:01 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 E9CA837B401; Thu, 3 Apr 2003 07:20:01 -0800 (PST) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 550C043FBF; Thu, 3 Apr 2003 07:19:52 -0800 (PST) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) h33FJXgg085897 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Apr 2003 18:19:33 +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 h33FJN7R085855; Thu, 3 Apr 2003 18:19:23 +0300 (EEST) (envelope-from ru) Date: Thu, 3 Apr 2003 18:19:22 +0300 From: Ruslan Ermilov To: Bruce Evans Message-ID: <20030403151922.GA76895@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> <20030403093800.GA68012@dhcp01.pn.xcllnt.net> <20030403200459.H30311@gamplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DocE+STaALJfprDB" Content-Disposition: inline In-Reply-To: <20030403200459.H30311@gamplex.bde.org> User-Agent: Mutt/1.5.4i cc: Juli Mallett cc: cvs-src@FreeBSD.org cc: src-committers@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: Thu, 03 Apr 2003 15:20:02 -0000 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 03, 2003 at 08:26:05PM +1000, Bruce Evans wrote: > On Thu, 3 Apr 2003, Marcel Moolenaar wrote: >=20 > > On Thu, Apr 03, 2003 at 11:53:50AM +0300, Ruslan Ermilov wrote: > > > > > > > How's this bugfix? > > > > > > %%% > > > Index: bsd.sys.mk > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > RCS file: /home/ncvs/src/share/mk/bsd.sys.mk,v > > > retrieving revision 1.12 > > > diff -u -r1.12 bsd.sys.mk > > > --- bsd.sys.mk 31 Mar 2003 13:10:51 -0000 1.12 > > > +++ bsd.sys.mk 3 Apr 2003 08:48:40 -0000 > > > @@ -25,7 +25,7 @@ > > > . if ${WARNS} > 3 > > > CFLAGS +=3D -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wsh= adow -Wcast-align > > > . endif > > > -. if ${WARNS} > 4 > > > +. if ${WARNS} > 4 && !empty(CFLAGS:M-O*) && empty(CFLAGS:M-O0) > > > CFLAGS +=3D -Wuninitialized > > > . endif > > > # BDECFLAGS > > > %%% > > > > Should work in most cases, but beware DEBUG_FLAGS. The above does not > > catch the case where DEBUG_FLAGS is defined to something like "-O0 -g". > > I think this is a reasonable use of DEBUG_FLAGS. > > > > \begin{log} > > dhcp01% setenv DEBUG_FLAGS "-O0 -g" > > dhcp01% setenv CFLAGS -O > > dhcp01% make > > cc -O -mcpu=3Dpentiumpro -I/usr/local/src/fpi/cpu/.. -O0 -g -Wsystem-h= eaders -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-proto= types -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -W= shadow -Wcast-align -Wuninitialized -c decode.c > > cc1: warnings being treated as errors > > cc1: warning: -Wuninitialized is not supported without -O > > *** Error code 1 > > \end{log} >=20 > The patch works for me, as it should since ${DEBUG_FLAGS} is added to > CFLAGS before including bsd.sys.mk in at least bsd.prog.mk. Similarly > for COPTS, except it is actually documented in mk/bsd.README. >=20 > There are some other minor ordering problems. -Winitialized is not set > for "-O -O0 -O" in ${CFLAGS}, >=20 I can fix this: %%% Index: bsd.sys.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/share/mk/bsd.sys.mk,v retrieving revision 1.12 diff -u -r1.12 bsd.sys.mk --- bsd.sys.mk 31 Mar 2003 13:10:51 -0000 1.12 +++ bsd.sys.mk 3 Apr 2003 15:12:56 -0000 @@ -25,8 +25,13 @@ . if ${WARNS} > 3 CFLAGS +=3D -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -= Wcast-align . endif -. if ${WARNS} > 4 +. if ${WARNS} > 4 && !empty(CFLAGS:M-O*) +. for entry in ${CFLAGS:M-O*} +_Oflag=3D ${entry} +. endfor +. if ${_Oflag} !=3D "-O0" CFLAGS +=3D -Wuninitialized +. endif . endif # BDECFLAGS . if ${WARNS} > 5 %%% > and there may be hackish makefiles that set > CFLAGS after including . >=20 That set -O's after including? ;-) These shouldn't probably be set to WARNS=3D5. 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 --DocE+STaALJfprDB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+jFD6Ukv4P6juNwoRAj3YAJ9dPOGI8LwhymuvtS3rqiW+ise7WQCdHE6u OVqHMIy8XtfYBbEwWxal6ts= =LSdD -----END PGP SIGNATURE----- --DocE+STaALJfprDB--