diff options
Diffstat (limited to 'src/backend/access/gist')
-rw-r--r-- | src/backend/access/gist/gist.c | 8 | ||||
-rw-r--r-- | src/backend/access/gist/giststrat.c | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index 6b6b2dc8d39..3f1f7b8674c 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -145,9 +145,11 @@ gistbuild(Relation heap, Datum *d; bool *nulls; int nb, nh, ni; +#ifndef OMIT_PARTIAL_INDEX ExprContext *econtext; TupleTable tupleTable; TupleTableSlot *slot; +#endif Oid hrelid, irelid; Node *pred, *oldPred; GISTSTATE giststate; @@ -199,6 +201,12 @@ gistbuild(Relation heap, econtext = makeNode(ExprContext); FillDummyExprContext(econtext, slot, hd, buffer); } + else /* shut the compiler up */ + { + tupleTable = NULL; + slot = NULL; + econtext = NULL; + } #endif /* OMIT_PARTIAL_INDEX */ scan = heap_beginscan(heap, 0, NowTimeQual, 0, (ScanKey) NULL); htup = heap_getnext(scan, 0, &buffer); diff --git a/src/backend/access/gist/giststrat.c b/src/backend/access/gist/giststrat.c index 5b204572bd5..c6212edf109 100644 --- a/src/backend/access/gist/giststrat.c +++ b/src/backend/access/gist/giststrat.c @@ -113,7 +113,7 @@ static StrategyEvaluationData GISTEvaluationData = { (StrategyTransformMap) GISTNegate, /* how to do (not qual) */ (StrategyTransformMap) GISTCommute, /* how to swap operands */ (StrategyTransformMap) GISTNegateCommute, /* how to do both */ - NULL + { NULL } }; StrategyNumber |