From e0e8a43544ca88c58f8be3b642d6bc7fed6bd8eb Mon Sep 17 00:00:00 2001 From: Tomas Vondra Date: Tue, 23 Aug 2016 17:57:57 +0200 Subject: [PATCH] cast contain_mutable_functions() parameters to (Node*) When calling the function for a target list, the compiler complains because it expects (Node*) but gets (List*). So fix that simply by casting to (Node*). Also fix a trivial typo in preprocess_rowmarks() - double semicolon, triggering warning about mixed declarations and code. --- src/backend/optimizer/plan/planner.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index 2b4e17c3ad..5c828ef718 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -2732,7 +2732,7 @@ grouping_planner(PlannerInfo *root, double tuple_fraction) ((root->distribution->distributionType == 'H' && bms_num_members(root->distribution->restrictNodes) == 1) || (root->distribution->distributionType == 'R' && - !contain_mutable_functions(result_plan->targetlist))))) + !contain_mutable_functions((Node *)result_plan->targetlist))))) result_plan = (Plan *) make_remotesubplan(root, result_plan, root->distribution, @@ -3094,10 +3094,10 @@ preprocess_rowmarks(PlannerInfo *root) */ CheckSelectLocking(parse, ((RowMarkClause *) linitial(parse->rowMarks))->strength); -#ifdef XCP + if (parse->jointree) { - Bitmapset *baserels = get_base_rel_indexes((Node *) parse->jointree);; + Bitmapset *baserels = get_base_rel_indexes((Node *) parse->jointree); int x, num_rels = 0; bool dist_found = false; @@ -3119,7 +3119,6 @@ preprocess_rowmarks(PlannerInfo *root) LCS_asString(((RowMarkClause *) linitial(parse->rowMarks))->strength)))); } -#endif } else { -- 2.39.5