Re: Getting rid of warnings

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Getting rid of warnings
Дата
Msg-id 20070125161106.GB8071@svr2.hagander.net
обсуждение исходный текст
Ответ на Re: Getting rid of warnings  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Getting rid of warnings  (Neil Conway <neilc@samurai.com>)
Re: Getting rid of warnings  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Getting rid of warnings
Следующее
От: Neil Conway
Дата:
Сообщение: Re: Getting rid of warnings