Skip to content

Commit d60e61d

Browse files
committed
Try to fix compiler warnings.
Per report from Peter Geoghegan. Discussion: http://postgr.es/m/CAH2-WznpwULZ3uJ1_6WXvNMXYbOy8k8tYs3r=qSdGmZeRd6tDw@mail.gmail.com
1 parent 9706092 commit d60e61d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/bin/pg_amcheck/pg_amcheck.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,19 +1643,20 @@ compile_database_list(PGconn *conn, SimplePtrList *databases,
16431643
}
16441644
else
16451645
{
1646+
DatabaseInfo *dat;
1647+
16461648
/* Current record pertains to a database */
16471649
Assert(datname != NULL);
16481650

16491651
/* Avoid entering a duplicate entry matching the initial_dbname */
16501652
if (initial_dbname != NULL && strcmp(initial_dbname, datname) == 0)
16511653
continue;
16521654

1653-
DatabaseInfo *dat = (DatabaseInfo *) pg_malloc0(sizeof(DatabaseInfo));
1654-
16551655
/* This database is included. Add to list */
16561656
if (opts.verbose)
16571657
pg_log_info("including database: \"%s\"", datname);
16581658

1659+
dat = (DatabaseInfo *) pg_malloc0(sizeof(DatabaseInfo));
16591660
dat->datname = pstrdup(datname);
16601661
simple_ptr_list_append(databases, dat);
16611662
}
@@ -2057,7 +2058,7 @@ compile_relation_list_one_db(PGconn *conn, SimplePtrList *relations,
20572058
{
20582059
int pattern_id = -1;
20592060
bool is_heap = false;
2060-
bool is_btree = false;
2061+
bool is_btree = false PG_USED_FOR_ASSERTS_ONLY;
20612062
Oid oid = InvalidOid;
20622063
const char *nspname = NULL;
20632064
const char *relname = NULL;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy