Commit d60e61de authored by Robert Haas's avatar Robert Haas

Try to fix compiler warnings.

Per report from Peter Geoghegan.

Discussion: http://postgr.es/m/CAH2-WznpwULZ3uJ1_6WXvNMXYbOy8k8tYs3r=qSdGmZeRd6tDw@mail.gmail.com
parent 97060928
...@@ -1643,6 +1643,8 @@ compile_database_list(PGconn *conn, SimplePtrList *databases, ...@@ -1643,6 +1643,8 @@ compile_database_list(PGconn *conn, SimplePtrList *databases,
} }
else else
{ {
DatabaseInfo *dat;
/* Current record pertains to a database */ /* Current record pertains to a database */
Assert(datname != NULL); Assert(datname != NULL);
...@@ -1650,12 +1652,11 @@ compile_database_list(PGconn *conn, SimplePtrList *databases, ...@@ -1650,12 +1652,11 @@ compile_database_list(PGconn *conn, SimplePtrList *databases,
if (initial_dbname != NULL && strcmp(initial_dbname, datname) == 0) if (initial_dbname != NULL && strcmp(initial_dbname, datname) == 0)
continue; continue;
DatabaseInfo *dat = (DatabaseInfo *) pg_malloc0(sizeof(DatabaseInfo));
/* This database is included. Add to list */ /* This database is included. Add to list */
if (opts.verbose) if (opts.verbose)
pg_log_info("including database: \"%s\"", datname); pg_log_info("including database: \"%s\"", datname);
dat = (DatabaseInfo *) pg_malloc0(sizeof(DatabaseInfo));
dat->datname = pstrdup(datname); dat->datname = pstrdup(datname);
simple_ptr_list_append(databases, dat); simple_ptr_list_append(databases, dat);
} }
...@@ -2057,7 +2058,7 @@ compile_relation_list_one_db(PGconn *conn, SimplePtrList *relations, ...@@ -2057,7 +2058,7 @@ compile_relation_list_one_db(PGconn *conn, SimplePtrList *relations,
{ {
int pattern_id = -1; int pattern_id = -1;
bool is_heap = false; bool is_heap = false;
bool is_btree = false; bool is_btree = false PG_USED_FOR_ASSERTS_ONLY;
Oid oid = InvalidOid; Oid oid = InvalidOid;
const char *nspname = NULL; const char *nspname = NULL;
const char *relname = NULL; const char *relname = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment