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

Re: Getting rid of warnings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Getting rid of warnings
Date: 2007-01-25 16:33:50
Message-ID: 20344.1169742830@sss.pgh.pa.us (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-patches
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 ...

			regards, tom lane

In response to

Responses

pgsql-patches by date

Next:From: Nikolay SamokhvalovDate: 2007-01-25 16:35:25
Subject: Re: tsearch in core patch, for inclusion
Previous:From: Joshua D. DrakeDate: 2007-01-25 16:31:21
Subject: Re: tsearch in core patch, for inclusion

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