Re: [HACKERS] Questions about warnings

2007-01-25 Thread Andrew Dunstan
Gavin Sherry wrote: On Thu, 25 Jan 2007, Magnus Hagander wrote: I'm looking over the VC build trying to eliminate what warnings are left. One thing that appears in a couple of places is stuff like: .\src\bin\psql\print.c(2014): warning C4090: 'function' : different 'const' qualifiers

Re: [HACKERS] Questions about warnings

2007-01-25 Thread Martijn van Oosterhout
On Thu, Jan 25, 2007 at 01:20:10PM +, 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 > i

Re: [HACKERS] Questions about warnings

2007-01-25 Thread Magnus Hagander
On Fri, Jan 26, 2007 at 12:26:45AM +1100, Gavin Sherry wrote: > On Thu, 25 Jan 2007, Magnus Hagander wrote: > > > I'm looking over the VC build trying to eliminate what warnings are > > left. One thing that appears in a couple of places is stuff like: > > > > .\src\bin\psql\print.c(2014): warning

Re: [HACKERS] Questions about warnings

2007-01-25 Thread Gavin Sherry
On Thu, 25 Jan 2007, Magnus Hagander wrote: > I'm looking over the VC build trying to eliminate what warnings are > left. One thing that appears in a couple of places is stuff like: > > .\src\bin\psql\print.c(2014): warning C4090: 'function' : different > 'const' qualifiers Seems like other proje

Re: [HACKERS] Questions about warnings

2007-01-25 Thread Gregory Stark
"Magnus Hagander" <[EMAIL PROTECTED]> writes: > I won't claim to know the inners good enough to comment on it. Does > "const char **" really mean that the point is const, or the pointer that > it points to is const? "const char **" means the character at the end of the pointer chain is constant.

Re: [HACKERS] Questions about warnings

2007-01-25 Thread Magnus Hagander
On Thu, Jan 25, 2007 at 01:38:14PM +0100, Peter Eisentraut wrote: > Magnus Hagander wrote: > > I'm looking over the VC build trying to eliminate what warnings are > > left. One thing that appears in a couple of places is stuff like: > > > > .\src\bin\psql\print.c(2014): warning C4090: 'function' :

Re: [HACKERS] Questions about warnings

2007-01-25 Thread Gregory Stark
"Peter Eisentraut" <[EMAIL PROTECTED]> writes: > The code in question is: > > const char **headers; > > [...] > > free(headers); Perhaps it ought not be declared "const char **headers" if you're planning on freeing it? I mean, it's not like you can pass an actual pointer to consta

Re: [HACKERS] Questions about warnings

2007-01-25 Thread Peter Eisentraut
Magnus Hagander wrote: > I'm looking over the VC build trying to eliminate what warnings are > left. One thing that appears in a couple of places is stuff like: > > .\src\bin\psql\print.c(2014): warning C4090: 'function' : different > 'const' qualifiers > > This happens in psql when we do free() on

[HACKERS] Questions about warnings

2007-01-25 Thread Magnus Hagander
I'm looking over the VC build trying to eliminate what warnings are left. One thing that appears in a couple of places is stuff like: .\src\bin\psql\print.c(2014): warning C4090: 'function' : different 'const' qualifiers This happens in psql when we do free() on a variable that's "const char **".