From 818fe9a11e360182bcc2d8375611b6f02dc4e53c Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Sat, 10 Dec 2022 13:59:06 +0900 Subject: [PATCH] Fix two warnings produced by -Wshadow=compatible-local Upstream PostgreSQL has added this switch to the standard compilation flags as of 0fe954c, hence trying to compile pg_hint_plan with upstream from this commit would cause those warnings. These are fixed by renaming the existing variables shadowing the others. Pull request #108 Reviewed-by: Julien Rouhaud --- pg_hint_plan.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pg_hint_plan.c b/pg_hint_plan.c index 11deccd6a2ed..175d92dda7e0 100644 --- a/pg_hint_plan.c +++ b/pg_hint_plan.c @@ -4624,9 +4624,9 @@ pg_hint_plan_join_search(PlannerInfo *root, int levels_needed, foreach (lc, initial_rels) { ListCell *lcp; - RelOptInfo *rel = (RelOptInfo *) lfirst(lc); + RelOptInfo *initrel = (RelOptInfo *) lfirst(lc); - foreach (lcp, rel->partial_pathlist) + foreach (lcp, initrel->partial_pathlist) { Path *path = (Path *) lfirst(lcp); @@ -4732,11 +4732,11 @@ pg_hint_plan_set_rel_pathlist(PlannerInfo * root, RelOptInfo *rel, if (inhibit_nonparallel) { - ListCell *lc; + ListCell *lcr; - foreach(lc, rel->pathlist) + foreach(lcr, rel->pathlist) { - Path *path = (Path *) lfirst(lc); + Path *path = (Path *) lfirst(lcr); if (path->startup_cost < disable_cost) {