Re: Questions about warnings

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Questions about warnings
Date: 2007-01-25 13:49:49
Message-ID: 20070125134949.GC13744@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 25, 2007 at 01:20:10PM +0000, Gregory Stark wrote:
> "const char **" means the character at the end of the pointer chain is
> constant. Which means my previous message is misguided, ignore it, sorry. In
> short, yes, this is a limitation of the const syntax in C and you have to cast
> it away in this case.

Well, you can say things like:

char * const *ptr

Which means that *ptr is const, but ptr and **ptr are not. Each of
those can be made const/not const as desired...

What is intended here is quite a different question, the use of pointers
in that part of psql is a bit haphazard at times. FWIW, Coverity
complains about stuff here too, but I just marked it all WONTFIX :).

Have anice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kenneth Marshall 2007-01-25 13:59:20 Re: [GENERAL] Autovacuum Improvements
Previous Message Simon Riggs 2007-01-25 13:49:35 WAL Record Header Size Reduction