[rrd-developers] [PATCH] Use -Werror.

Tobias Oetiker tobi at oetiker.ch
Thu Oct 2 09:18:55 CEST 2008


Hi Stebastian,

Yesterday Sebastian Harl wrote:

> Hi Tobi,
>
> On Wed, Oct 01, 2008 at 10:01:46PM +0200, Tobias Oetiker wrote:
> > Thanks for putting in all the fixes. I have applied them. I did
> > remove the -Werror though. I do like this for development, but as
> > rrdtool is also compiled by the unsuspecting public, it would be
> > rather unfortunate if it broke because some new / different version
> > of gcc chooses to spit out warnings on issues in the rrd code which
> > then cause it to fail on a platform.
>
> Well, usually such warnings indicate real problems. Admittedly, some of
> them might be minor issues but it does also include possible segfaults
> as seen in my patch. So, if those are detected by users that's a good
> thing imho. Also, enabling -Werror by default forces contributors to fix
> any such issues before submitting their patches. Both of that should
> improve the overall quality of the code.
>
> OTOH, currently, a lot of extra warnings are enabled by default which
> increase the risk of a build failure because of really minor issues. So,
> I suggest to do the following:
>
>   * disable (most of) those extra warnings by default and add a
>     configure option like --enable-strict-warnings to re-enable them on
>     demand

ok that reduces the 'risk' of getting warnings.

>   * use -Wall -Werror by default - this should catch common and real
>     errors only

ok

>   * possibly add another configure option to disable the use of -Werror
>     as a way out for the user and document that

ok that sounds like a sensible plan ... add documentation for the
configure options to both configure and to the build instructions


> What do you think? Does that sound like a feasible compromise to you? If
> you like that I'll provide a patch for it.

yep, go for it!

cheers
tobi
>
> Cheers,
> Sebastian
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-developers mailing list