httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@zyzzyva.com>
Subject Re: Fixing more compiler warnings/prototyping
Date Sun, 20 Oct 1996 21:04:13 GMT
> Randy Terbush wrote:
> > 
> > As mentioned in my previous mail, I, for some reason decided
> > to see if we could get through a compile with the following
> > flags turned on:
> > 
> > EXTRA_CFLAGS=-Wall -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes
> > -Wformat -Wmissing-prototypes -funsigned-char -Dscanf=DONT_USE_SCANF -Dgets=DONT
> > _USE_GETS -Werror
> > 
> > I've worked through alloc.c,alloc.h,http_main,c and http_main.h
> > 
> > The worst problems I found were some function variables which shadow
> > a few global variables. Still, it would be nice to get the prototypes
> > established and who knows what some compilers do in the case of these
> > shadowed variables.
> > 
> > The question this raises is that it would seem the likely time to
> > also submit these patches with the format changes included by the
> > indent rules. I'm including the patch for these 2 files below to
> > see if there is support to continue this work.
> 
> I'm broadly in favour - but there seem to a few places where you are adding
> unneeded prototypes. They're only necessary if there is a forward reference,
> and should not be used otherwise, IMHO.
> 
> Cheers,
> 
> Ben.

Can you give me an example of a "forward reference"? What I have done
is to fix the warnings given by gcc. There are a couple of places
in alloc.c where I added 'void' to the function declaration that was
probably unnecessary.




Mime
View raw message