pgsql: Remove dead code in pg_dump.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove dead code in pg_dump.
Date: 2016-01-17 16:39:18
Message-ID: E1aKqMI-0007Uz-Pd@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove dead code in pg_dump.

Coverity quite reasonably complained that this check for fout==NULL
occurred after we'd already dereferenced fout. However, the check
is just dead code since there is no code path by which CreateArchive
can return a null pointer. Errors such as can't-open-that-file are
reported down inside CreateArchive, and control doesn't return.
So let's silence the warning by removing the dead code, rather than
continuing to pretend it does something.

Coverity didn't complain about this before 5b5fea2a1, so back-patch
to 9.5 like that patch.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/57ce9acc04483df4913921d4ff21f01483583fb8

Modified Files
--------------
src/bin/pg_dump/pg_dump.c | 3 ---
1 file changed, 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-01-18 00:13:31 pgsql: Re-pgindent a few files.
Previous Message Peter Eisentraut 2016-01-17 02:07:44 pgsql: psql: Add completion support for DROP INDEX CONCURRENTLY