Skip site navigation (1) Skip section navigation (2)

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 19:57:27
Message-ID: 45B90BA7.6090202@hagander.net (view raw or flat)
Thread:
Lists: pgsql-patches
Tom Lane wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> Not sure I understand.
>> The header had:
>> isort(int4 *a, const int len)
>> and the code had
>> isort(int4 *a, int len)
> 
> Oh, I see.  Yeah, that's inconsistent, though my thought would be to
> remove the (rather useless) const decoration in the header.  I believe
> this coding is actually legal per C99, though, precisely because the
> version in the header is only decoration --- callers of the function
> do not care whether it thinks the parameter value is immutable inside
> itself.  The one at the function definition site is what counts ...

If it wasn't legal, it should be an error and not a warning. I would
guess it's a warning simply so you should be aware that it's ignored.
I'll update the patch for it.

//Magnus

In response to

pgsql-patches by date

Next:From: Gevik BabakhaniDate: 2007-01-25 21:47:19
Subject: uuid patch 2.0 (8.3devel)
Previous:From: Magnus HaganderDate: 2007-01-25 19:56:27
Subject: Re: Getting rid of warnings

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group