Re: GNOME CVS: gnome-core martin
- From: Maciej Stachowiak <mjs noisehavoc org>
- To: Owen Taylor <otaylor redhat com>
- Cc: Maciej Stachowiak <mjs noisehavoc org>, jacob berkman <jacob ximian com>, gnome-hackers gnome org
- Subject: Re: GNOME CVS: gnome-core martin
- Date: Mon, 13 Aug 2001 14:37:58 -0700
On 12Aug2001 10:45PM (-0400), Owen Taylor wrote:
>
> The question is not really whether warnings stick around, but
> whether bugs stick around.
>
In my experience at least 1/3 of warnings turn out to be actual bugs,
though sometimes obscure ones.
> -Werror:
>
> - Is somewhat of a wash for code quality. If you carefully review
> every warning, and carefully review your fixes, you probably
> make a net improvement. But careless squashing of warnings
> can easily introduce bugs, or put casts in the wrong place
> preventing the right fix from being made.
Hmm, I have seen fixing warnings fix bugs, but I've never seen a
confirmed sighting of it inroducing a bug.
> People are, of course, free to use -Werror in their modules, and
> are free to put -Werror in their CFLAGS, and send us patches.
>
> Warning suppression takes careful attention, and context switching
> to do that when a build dies is expensive, even if you know
> the code sufficiently well.
The best time to fix a warning is as soon as possible after you
introduce it, much as with any other bug. This is why -Werror being on
by default is a good thing - it prevents warnings from ever getting in
the state where a context switch is needed to fix it.
But anyway, it's a matter of taste, and not worth debating.
- Maciej
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]