[OpenAFS-devel] openafs warnings
Simon Wilkinson
sxw@inf.ed.ac.uk
Wed, 8 Jul 2009 15:33:56 +0100
On 8 Jul 2009, at 15:25, Dale Ghent wrote:
>
> Sounds great. I started on this patch a few years ago but due to
> time and job changes I didn't get too far.
>
> As far as the warnings go, are you measuring progress by what gcc
> has to say with -Wall ? You might want to try Sun's C compiler as
> well... it tends to gripe a whole lot more, especially when it comes
> to the K&R style stuff.
I've been munching away on warnings for a while now - over the last 2
years we've gone from around 30,000 warnings to around 2000, mainly
due to my patches. There's also a new --enable-warnings switch to
configure, which makes gcc a bit more picky. My intention at some
point is to submit a patch which makes this the default behaviour.
I'm at a point now where all of the 'simple' warnings have been
removed from my copy of the 1.5 tree. I've got a stack of patches
queued for submission upstream, which are just waiting on the
completion of the gerrit/git transition. The warnings that are left
are the more tricky ones (like multiple different names for des types).
I guess the next thing to do is a second pass using a pickier
compiler, enabling more gcc warnings, or teaching the compiler that
our various varargs functions are actually printf-like. At which point
a whole new set of warnings will appear. There's also the issue that
most of my work has just been done using the default configure options
- for example, when I enabled demand attach, a whole new world of pain
appeared.
Cheers,
Simon.