Re: pgsql: Minor pg_dump improvements

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Minor pg_dump improvements
Date: 2014-02-11 19:09:29
Message-ID: 20140211190929.GN15246@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 2014-02-09 02:29:25 +0000, Stephen Frost wrote:
> Minor pg_dump improvements
>
> Improve pg_dump by checking results on various fgetc() calls which
> previously were unchecked, ditto for ftello. Also clean up a couple
> of very minor memory leaks by waiting to allocate structures until
> after the initial check(s).

This triggers clang to emit:

/home/andres/src/postgresql/src/bin/pg_dump/pg_backup_archiver.c:1950:32: warning: comparison of constant -1 with expression of type
'ArchiveFormat' (aka 'enum _archiveFormat') is always false [-Wtautological-constant-out-of-range-compare]
if ((AH->format = fgetc(fh)) == EOF)
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
1 warning generated.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2014-02-11 19:39:43 Re: pgsql: Assert(IsTransactionState()) in RelationIdGetRelation().
Previous Message Tom Lane 2014-02-11 18:39:22 pgsql: Make gendef.pl emit DATA annotations for global variables.