[Swan-dev] Catching warnings. Always.
D. Hugh Redelmeier
hugh at mimosa.com
Sun Apr 13 20:11:59 EEST 2014
Recently I've noticed a couple of problems with commits because they
generated compiler warnings. This indicates to me that some
developers are not noticing warnings.
I urge everyone always watch for and heed warnings. I wonder how to
painlessly make it part of normal workflow.
I use Jove as my text-editor/IDE, I use the "compile-it" command to
(1) write all the changed file buffers to disk
(2) run "make programs", capturing the output in a buffer
(3) scan the make output for error messages
(4) place bookmarks in each source code position referenced in an error
(5) jump to the first such bookmark
I think that the GNU EMACS command "compile" has similar
It looks like vim also has this kind of feature:
I strongly recommend that developers look at these to see if they make
This probably means that your current directory ought to be libreswan,
not a subdirectory. This requires changes in a number of habits.
The most annoying change is having to use long pathnames in grep. My
solution is to define a Jove macro to do it for me (and set bookmarks
at the results) but I'm not going to research the appropriate vim way.
Here's the shell command that my macro generates. It could be made into
a shell script.
find * '(' -name '*.[ch]' -o -name '*.cpp' ')' -print0 | xargs -0 -r egrep -n '\<NAME\>'
More information about the Swan-dev