cvs commit: src/lib/libarchive Makefile

juli mallett jmallett at FreeBSD.org
Thu Feb 12 13:57:56 PST 2004


* Bruce Evans <bde at zeta.org.au> [ Date: 2004-02-12 ]
	[ w.r.t. Re: cvs commit: src/lib/libarchive Makefile ]
> On Thu, 12 Feb 2004, juli mallett wrote:
> 
> > * Dag-Erling Smørgrav <des at des.no> [ Date: 2004-02-12 ]
> > 	[ w.r.t. Re: cvs commit: src/lib/libarchive Makefile ]
> > > Tim Kientzle <kientzle at FreeBSD.org> writes:
> > > >   Log:
> > > >   libarchive itself is now completely clean at WARNS=10 on all architectures.
> > > >
> > > >   Unfortunately, the stock zlib.h is not:
> > > >     line 885: 'err' parameter shadows global 'err' definition from <err.h>
> > >
> > > This is trivial to fix, if we're willing to take zlib.h off the vendor
> > > branch or manage to convince Gailly to take our patch.
> >
> > Personally, I'm against prototype declarations in headers being
> > warning checked for parameter names, even moreso for headers not
> > included within the headers in question.
> 
> We force checking of system (including standard) headers using
> -Wsystem-headers, and I think this checking applies here.  I wouldn't
> want to turn of checking for all warnings in system headers.
> 
> Anyway, names like "err" in system headers are just bugs.  They break
> application code like:
> 
> #define	err	if you can see this, then <zlib.h> is broken
> #include <zlib.h>
> 
> zlib.h has many such bugs.  It looks like an application header that
> escaped to become a system header.

I think this particular form of warning is bogus.  In definitions,
argument names matter warnings-wise, in declarations, they don't.
Yes it's in the wrong namespace, but there's other problems you can
run into.
-- 
juli mallett. email: jmallett at freebsd.org; efnet: juli;
o/~ sweet talk like candy rots teeth o/~


More information about the cvs-src mailing list