Re: Questions about warnings

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: <pgsql-hackers(at)postgresql(dot)org>, "Magnus Hagander" <magnus(at)hagander(dot)net>
Subject: Re: Questions about warnings
Date: 2007-01-25 13:11:15
Message-ID: 873b5zckuk.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Peter Eisentraut" <peter_e(at)gmx(dot)net> 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 constant
memory to this function and expect it to work, and who says free doesn't
modify the data the pointer points to anyways, plenty do.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2007-01-25 13:18:57 Re: Questions about warnings
Previous Message Peter Eisentraut 2007-01-25 12:38:14 Re: Questions about warnings