Re: Getting rid of warnings - Mailing list pgsql-patches

From Magnus Hagander
Subject Re: Getting rid of warnings
Date
Msg-id 20070125161106.GB8071@svr2.hagander.net
Whole thread Raw
In response to Re: Getting rid of warnings  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Getting rid of warnings
Re: Getting rid of warnings
List pgsql-patches
On Thu, Jan 25, 2007 at 10:57:29AM -0500, Tom Lane wrote:
> Magnus Hagander <magnus@hagander.net> writes:
> >   bool
> > ! isort(int4 *a, int len)
> >   {
> >   bool
> > ! isort(int4 *a, const int len)
> >   {
>
> If VC thinks that that is required to fix a warning, it's too broken to live.
> AFAICS what you've got there is a compiler that is being pedantically
> strict about language details that it does not actually understand well;
> its apparent idea that "const **" means "const * const *" being much in
> the same line as this one.

Not sure I understand.
The header had:
isort(int4 *a, const int len)
and the code had
isort(int4 *a, int len)

Where does the ** part come in there? It's not even a pointer!
I see the ** part for the free()/pfree() issues, but the one you're
quoting there is completely different. This is, AFAICS, a case of the
header not matching the body.

I'm fine with having that one rejected as well, and weill just file that
away as an expected-please-ignore warning, but I'd prefer to understand
why :)

//Magnus

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Getting rid of warnings
Next
From: Neil Conway
Date:
Subject: Re: Getting rid of warnings