Re: Getting rid of warnings

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Getting rid of warnings
Date: 2007-01-25 16:11:06
Message-ID: 20070125161106.GB8071@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Thu, Jan 25, 2007 at 10:57:29AM -0500, Tom Lane wrote:
> Magnus Hagander <magnus(at)hagander(dot)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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Teodor Sigaev 2007-01-25 16:15:15 Re: tsearch in core patch, for inclusion
Previous Message Teodor Sigaev 2007-01-25 16:06:16 Re: tsearch in core patch, for inclusion