[Swan-dev] "not rocket science" -- master that doesn't fail

D. Hugh Redelmeier hugh at mimosa.com
Wed Jan 21 21:03:03 EET 2015


| From: Antony Antony <antony at phenome.org>

| I wonder if libreswan code is ready for -Werror as a default. That might 
| break some builds easily.

And that's a very good thing!

 The last I checked we have a couple warnings 
| when compiling on 32bit ARM. 
| https://kojipkgs.fedoraproject.org//packages/libreswan/3.12/1.fc20/data/logs/armv7hl/build.log
| 
| These warnings don't show up on x86_64. May be these are easy to fix, but wonder how easy it is hunt them.

See how Andrew fixed some real bugs because he was informed about the
warnings?  That's a very very good thing.

| Also while developing/debugging, sometimes, I want to build ignoring the 
| warnings. That would mean disabling -Werror my Makefile.inc.local :)

Warnings are a great way to "fail fast" (I'm trying to learn
fashionable terminology).

They tell you you've got something wrong without having to execute the
code.  Often they tell you things that you might not even learn from
execution.

I actually don't care a lot about -Werror for myself because my own
processes don't ignore warnings.  (I run make under JOVE and it takes
me to each point of code that elicits a diagnostic, warning or error.)

I want you guys to care about warnings because I don't want anything
with warnings to be checked in.  You may have noticed that I've
cleaned up a number of warnings that were caused by other people's
commits.

I want -Werror to rub our nose in portability bugs because I only test
on one architecture.

If you need to turn off -Werror, you can do so.  But that should be
a rare case and we should not optimize for it.

Summary: we should not ignore warnings; --Werror "encourages" that.

Admission: some warnings can be wrong.  clang's in particular.  Maybe
we could not live with -Werror if we were using clang.


More information about the Swan-dev mailing list