Re: [rfc] removing/conditionalising WERROR= in Makefiles

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Wed, 28 Dec 2011 00:49:17 +0100
On 2011-12-27 02:04, Philip Paeps wrote:
> On 2011-12-26 10:10:40 (+0000), Alexander Best<arundel_at_freebsd.org>  wrote:
>> i grep'ed through src/sys and found several places where WERROR= was set in
>> order to get rid of the default -Werror setting. i tried to remove those
>> WERROR= overrides from any Makefile, where doing so did not break tinderbox.
>>
>> in those cases, where it couldn't be completely removed, i added conditions to
>> only set WERROR= for the particular achitecture or compiler, where tinderbox
>> did not suceed without the WERROR=.
>
> Wouldn't it be better to set WARNS=x rather than WERROR=?  WERROR= says "this
> code has bugs, it breaks tinderbox" whereas WARNS=x says "this code has the
> following kind of bugs which break tinderbox".

In my opinion, WERROR= says: there are warnings in this code which
cannot be fixed right now, due to varying reasons, but we don't want to
muffle them entirely, so somebody will eventually fix them in the future
(or just delete the code, if it is unmaintained, or unmaintainable, like
nve).

If you set WARNS to a low level, you can be sure nobody ever sees the
warnings, and they will never be fixed.  That may be appropriate in some
cases, but not the ones I just added WERROR= to.  Those are just crufty
drivers, that nobody wants to burn their fingers on. :)
Received on Tue Dec 27 2011 - 22:49:21 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:22 UTC