[OpenAFS-devel] warnings fix

Marcus Watts mdw@umich.edu
Tue, 14 Jul 2009 19:53:40 -0400


Simon writes:
> As I said, it isn't the gatekeepers - just me, and whenever I get  
> bored on a train journey. If you're wanting to help cleanup the  
> warnings please, be my guest. We should just co-ordinate our efforts.

Ok.  Many of the changes are indeed yours.  But

dae49105c81b526f7fb3c3832984e9411c5c7ac2	jaltman@secure-endpoints.com
73cef96bb335056963c31a6ec382cb4fa969b29e	jaltman@secure-endpoints.com
c8920835ae9e33555a7d023cd0bd3a2f26a98b98	rra@stanford.edu
215838d65734ad819d3bd27a2f715d1d6f68394a	rra@stanford.edu

claim not to be yours.  Presumably they were waiting for git too.

Really, I'm thrilled to see things fixed.  I don't really care
who or why these things were suddenly committed starting friday.
It still means that part or all of the changes I had duplicate
changes that are "en train" by you or others.  Note that when
I posted my mail monday, those were real stats from my build of rxk5.

So, do you have more of these changes?

I see also you and Dale had responded, so

You had said before,
...
> 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
...

I admit it's extremely not fair of me, but I tend to read "just waiting"
as "they might exist 2 years in the future".

If you had instead said "I'm just waiting for git, here's a copy in
/afs/..."  or "These aren't done yet, but here's an early copy" I might
have thought "I wonder how his changes compare to mine" or "hmm.  his
is better there, but mine is better here, can we mix and match?"
Or even better "wow, this saves me time".  If you're interested in
cooperating, this would be something to think about.

You said before,
> years we've gone from around 30,000 warnings to around 2000, mainly
> due to my patches.
...

which I greatly appreciate.

You said:
...
> 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
...
and I just posted,
...
> > Also of interest were error and debug messages which were broken,
> > including at least one ...

I found those by prototyping various log functions.

and
... > There's also a new --enable-warnings switch to
> configure, which makes gcc a bit more picky. My intention at some

... which you mentioned at the workshop.

You have:
	-Wall -Wstrict-prototypes -Wold-style-definition
Might I suggest:
	-Wall -Wstrict-prototypes -Wold-style-definition -Wpointer-arith

you said
> 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.

Yes.  For hk34, I built variations with "mit k5", "openssl", and "no rxk5",
on i386 & amd64.  I'm only interested in the pain with k5ssl/rxk5 for
this, and it's still tedious.  Another variation on pain is to try
building all the targets in a directory from "scratch", to see if
all the dependency rules necessary are actually present.

Dale had said:
> 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.
& Derrick had earlier said:
> Also, remember some of it will no doubt be reverted when we discover
> it breaks (pick a sad platform).

I'd *really* like to use other compilers as well and build for more
architectures.  Unfortunately, the university decided to cut costs
several years back by having a monoculture of Linux.

I really would like to do builds with sun workshop c for sparc/64, and
also ibm xlC for powerpc.  It'd be nice to be able to test the build
too, and that works out to 2-3 machines.  Probably if I did the right
rain dance I could have them, -- but the rain dance takes time,
and did I mention the monoculture of Linux?

and finally you said (a bit out of context here):
> 
> If these issues still exist, patches to fix them would be greatly  
> appreciated!
> 

I don't know which issues still exist.  You claim to have eliminated all
the "simple" errors.  If you have, none should exist, and your warnings
count and statistics should be quite similar to mine.  For my part,
it's going to take me some time to figure out which part of your
changes supersede mine, so that I can discard that work.

						-Marcus Watts