On Jul 9, 2011, at 11:01 PM, Doug Barton wrote:

> On 07/08/2011 15:29, Warner Losh wrote:
>> 
>> On Jul 8, 2011, at 2:25 AM, Craig Rodrigues wrote:
>> 
>>> Hi,
>>> 
>>> While not ideal, would it be possible consider setting WARNS to set
>>> different levels
>>> depending on what the value of ${MACHINE_ARCH} is?
>>> 
>>> Something like:
>>> 
>>> .if ${MACHINE_ARCH} != "sparc64"  (or whatever the correct value is)
>>> WARNS ?= 0
>>> .else
>>> WARNS ?= 2
>>> .endif
>>> 
>>> This would at least be an attempt to prevent people from adding new
>>> code to libstand which introduce new warnings.
>> 
>> We've avoided this in the tree, and I'd urge against it.  It gives a
>> false sense of security and tends to make problems linger.  I'd like to
>> strongly argue against it.
> 
> If I'm missing something here, feel free to correct me. But what you
> seem to be saying is that WARNS should be kept down to the LCD, is that
> right?

Yes.

> If so, wouldn't that mean that the problems are just going to be
> ignored perpetually?

No.  History has shown that they are properly fixed on all platforms in the 
fullness of time.

> ISTM that what Craig is proposing gives us the benefits of noticing
> breakage faster at higher WARNS levels for those arches that support
> them, while allowing interested folks to pick up the work on the
> less-well-supported arches as time allows. I don't see a downside to that.

Yes.  I understand Craig's theory.  The down-side is that people just if !mips 
or if !arm stuff out thinking it is safe to do so, when in fact the warnings 
are telling you about real (or potentially real) bugs on the platform in 
question.  So instead of making things safer, you are really masking the bugs.  
Better to fix the warnings on those platforms than to pretend that WARNS=9 on 
i386 is "good enough" and that you can bump that down to WARNS=1 when you 
encounter something you don't understand.

So, it might catch one or two trivial things, but if we do it throughout the 
tree I worry that the very good efforts to raise the warnings for all ports 
will come to a stop and we'll wind up with fewer bug fixes for the platforms 
that complain.  Having the low WARNS= today motivates people to fix stuff...

Warner_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to