Subject: Re: Kernel warnings/cflags
To: None <jchacon@genuity.net>
From: Bill Studenmund <wrstuden@zembu.com>
List: port-macppc
Date: 05/02/2001 12:10:21
On Sun, 29 Apr 2001 jchacon@genuity.net wrote:

> Can anyone think of a reason to not change CWARNFLAGS to
> 
> -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes
> 
> instead of
> 
>  -Werror -Wreturn-type -Wpointer-arith
> 
> which is all that's there today.

Yes. gcc's ability to detect variables used uninitialized is not that
swift. It generates a lot of false positives.

> The files so far that broke were bus.h and a few misc ones which either
> didn't have proper prototyping in scope or in some cases weren't using
> prototypes. bus.h broke because the definitions for the bus_* functions were
> all done in K&R style. That's a quick fix.
> 
> The main reason here is to catch prototype errors and type promotions/etc
> that -Wall pulls in. Plus a quick scan of the other port's shows the above
> options to be more inline with any idea of a standard option set across
> ports. Hell..the fact that my testing showed possible prototyping/scoping
> problems tells me this should be there. I've found a few actual bugs so this
> does seem important to have.

I think a better thing to do is get it so we can lint the kernel. :-) The
main things that we need are 1) C "routines" for lint for asm routines
called from C, and 2) fake calls (probably in (1)) to C routines called
only from asm code.

Take care,

Bill