You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Randy Terbush <ra...@zyzzyva.com> on 1996/10/20 23:04:13 UTC

Re: Fixing more compiler warnings/prototyping

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