Thread: pgsql: Suppress some compiler warnings in recent commits.

pgsql: Suppress some compiler warnings in recent commits.

From
Tom Lane
Date:
Suppress some compiler warnings in recent commits.

Older versions of gcc tend to throw "variable might be clobbered by
`longjmp' or `vfork'" warnings whenever a variable is assigned in more than
one place and then used after the end of a PG_TRY block.  That's reasonably
easy to work around in execute_extension_script, and the overhead of
unconditionally saving/restoring the GUC variables seems unlikely to be a
serious concern.

Also clean up logic in ATExecValidateConstraint to make it easier to read
and less likely to provoke "variable might be used uninitialized in this
function" warnings.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=375e5b0a687570eb41fb9e9fda9e5d6992fccffa

Modified Files
--------------
src/backend/commands/extension.c |   31 ++++++++++++-------------------
src/backend/commands/tablecmds.c |   37 ++++++++++++++++++-------------------
2 files changed, 30 insertions(+), 38 deletions(-)


Re: pgsql: Suppress some compiler warnings in recent commits.

From
Simon Riggs
Date:
On Tue, 2011-02-08 at 23:12 +0000, Tom Lane wrote:

> Also clean up logic in ATExecValidateConstraint to make it easier to read
> and less likely to provoke "variable might be used uninitialized in this
> function" warnings.

Thanks.

--
 Simon Riggs           http://www.2ndQuadrant.com/books/
 PostgreSQL Development, 24x7 Support, Training and Services