mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Try to fix compiler warnings.
Per report from Peter Geoghegan. Discussion: http://postgr.es/m/CAH2-WznpwULZ3uJ1_6WXvNMXYbOy8k8tYs3r=qSdGmZeRd6tDw@mail.gmail.com
This commit is contained in:
@ -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,
|
|||||||
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,
|
|||||||
{
|
{
|
||||||
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;
|
||||||
|
Reference in New Issue
Block a user