Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Jul 2009 23:15:22 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Stanislav Sedov <stas@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, Martin Blapp <mbr@freebsd.org>, src-committers@freebsd.org
Subject:   Re: svn commit: r195213 - head/usr.sbin/wake
Message-ID:  <20090701223719.L39215@delplex.bde.org>
In-Reply-To: <20090701124825.af0d205e.stas@FreeBSD.org>
References:  <200906302209.n5UM9lBM093495@svn.freebsd.org> <20090701124825.af0d205e.stas@FreeBSD.org>

index | next in thread | previous in thread | raw e-mail

On Wed, 1 Jul 2009, Stanislav Sedov wrote:

> On Tue, 30 Jun 2009 22:09:47 +0000 (UTC)
> Martin Blapp <mbr@FreeBSD.org> mentioned:
>> Log:
>>   Compiles without higher warn level
>>
>>  MAN=	wake.8
>>
>> -WARNS?= 2
>> -
>
> I believe you wanted something like WARNS?=6 probably?  Now you disabled
> any warnings-related compiler flags entirely.

WARNS should only be set in near-top-level Makefile.inc's.  Setting it
elsewhere is either a style bug to increase the warning level or a hack
to decrease the warning level.  However, setting of WARNS in near-top-
level Makefile.inc's stalled several years ago at the same time as its
excessive setting in individual Makefiles.  It is still not set at all
in usr.sbin/Makefile.inc, while in usr.bin its setting is commented
out "temporarily".  Only the relatively simple bin directory has been
handled well -- bin/Makefile.inc and most files under it started uniformly
at WARNS=2, and bin/Makefile.inc has now reached WARNS=6, with only the
following bugs and hacks in leaf Makefiles:

% ./rmail/Makefile:WARNS?=	0

Apparently, sendmail isn't written in C yet.

% ./cat/Makefile:WARNS?=	6

Bogus override of the default to the same value.  cat compiled happily
with the default WARNS of 6 for 6 years before this bug was committed
in 2009, after being fixed in 2001 to not set WARNS, so that it
automatically picked up the change of the default from 2 to 6 in 2003.

% ./csh/Makefile:WARNS?=	0

Csh was never written in C :-).

% ./ed/Makefile:WARNS?=	2
% ./pax/Makefile:WARNS?=	3
% ./pkill/Makefile:WARNS?=	5
% ./sh/Makefile:WARNS?=	2

Assorted hacks.

% ./uuidgen/Makefile:WARNS?=	6

Another bogus override of the default.

In usr.sbin, WARNS has never been turned on globally, and slightly more
than half of the makefiles don't set it locally either.

Bruce


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090701223719.L39215>