Daniel Rall wrote:
> On Thu, 03 Nov 2005, Malcolm Rowe wrote:
>
>>Drat! How did I miss that? (it even generates a warning!)
>
> A "best practice" which maxb suggested to me that helps with that is
> to put the following into your shell's ~/.profile (or equivalent):
>
> EXTRA_CFLAGS='-Wall -Werror'
> export EXTRA_CFLAGS
That's OK if you don't have any warnings in a normal build. I normally enable
the following set of extra warnings for Subversion builds (with GCC 3.3.5):
-Wundef -Wendif-labels -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wredundant-decls -Wnested-externs
That means I do get a few warnings in a full build - particularly "cast
discards qualifiers" - some of which cannot be worked around, yet I still find
it useful because I will (sometimes) notice if they appear within a partial
build of whatever files I'm playing with.
What I would really like is to have the warnings generated during "make"
accumulated somewhere and displayed at the end, including (optionally) those
that were generated in previous runs for files that were not re-compiled in the
latest run. At my last job I wrote a comprehensive but ad-hoc build system
that did this with a mixture of Make, DOS batch files and external utilities.
It wasn't in a fit state to be re-used. For my Subversion full builds I do
capture the output of "make" and grep for warnings and store them in a file,
but I haven't written anything to update this file with the results of partial
builds.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 3 19:37:58 2005