You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ben Laurie <be...@gonzo.ben.algroup.co.uk> on 1996/10/20 21:05:05 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.

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email: ben@algroup.co.uk
A.L. Digital Ltd,           URL: http://www.algroup.co.uk
London, England.            Apache Group member (http://www.apache.org)