This is an automated email from the ASF dual-hosted git repository.

reshke pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/main by this push:
     new 4b71649a53 Fix incorrect codes in pg_backup_archiver.c (#899)
4b71649a53 is described below

commit 4b71649a539f52425b4b2aca75d961c1720761d4
Author: reshke <[email protected]>
AuthorDate: Mon Feb 3 13:18:39 2025 +0500

    Fix incorrect codes in pg_backup_archiver.c (#899)
    
    pg_backup_archiver.c: In function ‘CloneArchive’:
    pg_backup_archiver.c:4877:9: error: the comparison will always evaluate as 
‘true’ for the address of ‘binary_upgrade’ will never be NULL [-Werror=address]
     4877 |         ConnectDatabase((Archive *) clone, 
&clone->public.ropt->cparams, true, &clone->public.ropt->binary_upgrade);
          |         ^~~~~~~~~~~~~~~
    In file included from pg_backup_archiver.h:30,
                     from parallel.h:19,
                     from pg_backup_archiver.c:39:
    pg_backup.h:138:33: note: ‘binary_upgrade’ declared here
      138 |         int                     binary_upgrade;
          |                                 ^~~~~~~~~~~~~~
---
 src/bin/pg_dump/pg_backup_archiver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/pg_dump/pg_backup_archiver.c 
b/src/bin/pg_dump/pg_backup_archiver.c
index b244134041..1a2f020677 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -4874,7 +4874,7 @@ CloneArchive(ArchiveHandle *AH)
         * Connect our new clone object to the database, using the same 
connection
         * parameters used for the original connection.
         */
-       ConnectDatabase((Archive *) clone, &clone->public.ropt->cparams, true, 
&clone->public.ropt->binary_upgrade);
+       ConnectDatabase((Archive *) clone, &clone->public.ropt->cparams, true, 
clone->public.ropt->binary_upgrade);
 
        /* re-establish fixed state */
        if (AH->mode == archModeRead)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to