Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Mar 2002 20:49:20 +0000
From:      Mark Murray <mark@grondar.za>
To:        Alfred Perlstein <bright@mu.org>
Cc:        Mike Silbersack <silby@silby.com>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/usr.bin/rwall rwall.c 
Message-ID:  <200203072049.g27KnKRV073901@grimreaper.grondar.org>
In-Reply-To: <20020307203324.GH26621@elvis.mu.org> ; from Alfred Perlstein <bright@mu.org>  "Thu, 07 Mar 2002 12:33:24 PST."
References:  <20020307203324.GH26621@elvis.mu.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > I believe I've asked this before, but I haven't heard a good answer:
> > 
> > What benefit do the WARNS changes have?
> > 
> > I'd understand the need for "strcpy -> strlcpy changes" or "snprintf
> > changes", but I don't see what good the WARNS changes are having.  Is this
> > documented somewhere?
> 
> I'm not sure about it being documented however my point of view is that
> it gives us code that can be compiled with a high number of compiler
> diagnostics turned on to prevent and aid in preventing future mistakes.

What Alfred said.

The more you can get the compiler to help you, the less stupid mistakes
you make.

When calling foreign functions, mixing modules, getting creative with
data structures, etc, the amount of work that you can unload to the compiler
by turning on this level of warning can save boatloads of work.

I've had _many_ bugs pointed out to me by turning on maximum warnings.

My opinion is that for shared code, this amount of proactive help is
so wise as to be (almost) compulsory.

M
-- 
o       Mark Murray
\_
O.\_    Warning: this .sig is umop ap!sdn

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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