[patch][gui] Makefile.am -Werror

Andreas Tobler toa@pop.agri.ch
Mon Oct 25 20:53:00 GMT 2004


Andreas Tobler wrote:

> Hi all,
> 
> if my warning patrol succeeds, I'd like to propose the following patch:
> 
> Andreas
> 
> 2004-10-22  Andreas Tobler  <a.tobler@schweiz.ch>
> 
>     * Makefile.am (WARNINGS): Replace -W with -Wextra, more speaking.
>     (PEDANTIC_CFLAGS): Add -Werror.
>     * Makefile.in: Regenerate.
> 

Ok, this -Werror caused some discussion on irc. I'd like to point out 
here on the ml my motivation for this. (A repetition for a few of you, 
sorry)

First, it is still a proposal. It is not a must.
Second, it is only meant for the jni/gtk-peer aka gtk_c_files. Not for 
the whole libjava tree.

I know it is boring to break every compile if we 'only' have a warning 
turned into error, especially in the implementation cycle.
But there are a quite a few developers on this project, over the time 
they come and go, they participate often or a bit less. They are spread 
all over the globe.
It is pretty difficult to find out the why and how some things are 
implemented this way. And if you find tons of warnings accumulated over 
the time you spend an amount of work to understand and clean up.

This -Werror flag is in my opinion a way to keep our code clean, to be 
safe over the time and offer our community a clean entry point for 
further development.

Also, we're part of gcc and I think we should be a good example in 
writing code. This flag helps us. I often take a look into gcc sources 
to find out on how to use some code. And I'd feel a bit hesitant if I 
know that we hack around :)

Sure, there are a lot of areas where we have to say that we can't avoid 
warnings, e.g automatically created code for rpc stuff. Or some strange 
header issues. But here we do not have rpc only gtk and c issues.

And if we do not try it, we never know...

As a further proposal, we could borrow the thoughts from Mark Wielaard 
and introduce a --disable-werror if this would help.

these are my thoughts, well, being a burnt person who has to clean up 
code which even disabled all warnings you may understand.....

Regards,
Andreas






More information about the Java-patches mailing list