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

Commit345bf97

Browse files
committed
Ignore PQcancel errors properly
Add a (void) cast to all PQcancel() calls that purposefully don't checkthe return value, to keep compilers and static checkers happy.Per Coverity.
1 parent57811b7 commit345bf97

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/bin/pg_dump/pg_backup_db.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,12 @@ DisconnectDatabase(Archive *AHX)
342342
if (AH->connCancel)
343343
{
344344
/*
345-
* If we have an active query, send a cancel before closing. This is
346-
* of no use for a normal exit, but might be helpful during
347-
* exit_horribly().
345+
* If we have an active query, send a cancel before closing, ignoring
346+
*any errors. This isof no use for a normal exit, but might be
347+
*helpful duringexit_horribly().
348348
*/
349349
if (PQtransactionStatus(AH->connection)==PQTRANS_ACTIVE)
350-
PQcancel(AH->connCancel,errbuf,sizeof(errbuf));
350+
(void)PQcancel(AH->connCancel,errbuf,sizeof(errbuf));
351351

352352
/*
353353
* Prevent signal handler from sending a cancel after this.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp