Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6b3b3a5

Browse files
committed
Remove dead code in pg_dump.
Coverity quite reasonably complained that this check for fout==NULLoccurred after we'd already dereferenced fout. However, the checkis just dead code since there is no code path by which CreateArchivecan return a null pointer. Errors such as can't-open-that-file arereported down inside CreateArchive, and control doesn't return.So let's silence the warning by removing the dead code, rather thancontinuing to pretend it does something.Coverity didn't complain about this before5b5fea2, so back-patchto 9.5 like that patch.
1 parent0760225 commit6b3b3a5

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,6 @@ main(int argc, char **argv)
611611
/* Register the cleanup hook */
612612
on_exit_close_archive(fout);
613613

614-
if (fout==NULL)
615-
exit_horribly(NULL,"could not open output file \"%s\" for writing\n",filename);
616-
617614
/* Let the archiver know how noisy to be */
618615
fout->verbose=g_verbose;
619616

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp