From 67e4fde2f538fd3f21c8e5351b73905967bdac3f Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Mon, 7 Aug 2017 19:40:11 +0300 Subject: [PATCH] Fix some compiler warnings that have crept up recently. Clean up after commits e40e78fabb, 038aa959c8, 859d65923a and a21da89e4f. Tut tut. --- src/backend/access/transam/xlog.c | 1 - src/backend/cdb/dispatcher/cdbgang.c | 2 ++ src/backend/executor/nodePartitionSelector.c | 4 ++-- src/backend/optimizer/util/walkers.c | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 83ae5d4746..9138266324 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -129,7 +129,6 @@ bool XLOG_DEBUG = false; /* these are derived from XLOG_sync_method by assign_xlog_sync_method */ int sync_method = DEFAULT_SYNC_METHOD; static int open_sync_bit = DEFAULT_SYNC_FLAGBIT; -static Relation XLogSaveBufferForHint_Relation = NULL; /* * walreceiver process receives xlog data from walsender process. diff --git a/src/backend/cdb/dispatcher/cdbgang.c b/src/backend/cdb/dispatcher/cdbgang.c index 3910808792..d0e3e40684 100644 --- a/src/backend/cdb/dispatcher/cdbgang.c +++ b/src/backend/cdb/dispatcher/cdbgang.c @@ -99,7 +99,9 @@ static CdbComponentDatabaseInfo *findDatabaseInfoBySegIndex( CdbComponentDatabases *cdbs, int segIndex); static void addGangToAllocated(Gang *gp); static Gang *getAvailableGang(GangType type, int size, int content); +#ifdef USE_ASSERT_CHECKING static bool readerGangsExist(void); +#endif /* * Create a reader gang. diff --git a/src/backend/executor/nodePartitionSelector.c b/src/backend/executor/nodePartitionSelector.c index 7131eabd00..dfbd89df91 100644 --- a/src/backend/executor/nodePartitionSelector.c +++ b/src/backend/executor/nodePartitionSelector.c @@ -259,7 +259,7 @@ ExecPartitionSelector(PartitionSelectorState *node) return candidateOutputSlot; } -static void LogSelectedPartitionsForScan(int32 selectorId, const HTAB *pidIndex, const int32 scanId); +static void LogSelectedPartitionsForScan(int32 selectorId, HTAB *pidIndex, const int32 scanId); void LogPartitionSelection(EState *estate, int32 selectorId) { @@ -283,7 +283,7 @@ void LogPartitionSelection(EState *estate, int32 selectorId) } } -void LogSelectedPartitionsForScan(int32 selectorId, const HTAB *pidIndex, const int32 scanId) +void LogSelectedPartitionsForScan(int32 selectorId, HTAB *pidIndex, const int32 scanId) { int32 numPartitionsSelected = 0; Datum *selectedPartOids = palloc(sizeof(Datum) * hash_get_num_entries(pidIndex)); diff --git a/src/backend/optimizer/util/walkers.c b/src/backend/optimizer/util/walkers.c index cbd5d109f6..2c60ca4578 100644 --- a/src/backend/optimizer/util/walkers.c +++ b/src/backend/optimizer/util/walkers.c @@ -8,6 +8,7 @@ #include "postgres.h" #include "miscadmin.h" +#include "nodes/nodeFuncs.h" #include "optimizer/walkers.h" #include "optimizer/var.h" -- GitLab