diff options
author | Andres Freund <andres@anarazel.de> | 2019-09-27 14:10:16 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2019-09-27 14:14:30 -0700 |
commit | 3f6b3be39ca91a62b88051a6b4fdf428a05c6b0d (patch) | |
tree | b27ffe540f6d1c22a3bf0dcead07ce2fba182deb /src/backend/commands/dbcommands.c | |
parent | 5adafaf176d09ba5ea11ae128416fc5211469bc0 (diff) | |
download | postgresql-3f6b3be39ca91a62b88051a6b4fdf428a05c6b0d.tar.gz postgresql-3f6b3be39ca91a62b88051a6b4fdf428a05c6b0d.zip |
Silence -Wmaybe-uninitialized compiler warnings in dbcommands.c.
When compiling postgres using gcc -O3, there are false-positive
warnings about the now initialized variables. Silence them.
Author: Peter Eisentraut, Andres Freund
Discussion: https://postgr.es/m/15fb2350-b8b8-e188-278f-0b34fdee5210@2ndquadrant.com
Diffstat (limited to 'src/backend/commands/dbcommands.c')
-rw-r--r-- | src/backend/commands/dbcommands.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index 95881a85509..01d66212e98 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -26,6 +26,7 @@ #include "access/genam.h" #include "access/heapam.h" #include "access/htup_details.h" +#include "access/multixact.h" #include "access/tableam.h" #include "access/xact.h" #include "access/xloginsert.h" @@ -103,14 +104,14 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt) Relation rel; Oid src_dboid; Oid src_owner; - int src_encoding; - char *src_collate; - char *src_ctype; + int src_encoding = -1; + char *src_collate = NULL; + char *src_ctype = NULL; bool src_istemplate; bool src_allowconn; - Oid src_lastsysoid; - TransactionId src_frozenxid; - MultiXactId src_minmxid; + Oid src_lastsysoid = InvalidOid; + TransactionId src_frozenxid = InvalidTransactionId; + MultiXactId src_minmxid = InvalidMultiXactId; Oid src_deftablespace; volatile Oid dst_deftablespace; Relation pg_database_rel; |