aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/postgres_fdw.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2022-10-07 13:13:27 +1300
committerDavid Rowley <drowley@postgresql.org>2022-10-07 13:13:27 +1300
commitcd4e8caaa0eb5c3d3b12a45b29035e7a4bdfa4a8 (patch)
tree1224839ecbcbd206305dc3bf12403ab3e42e3488 /contrib/postgres_fdw/postgres_fdw.c
parent4289263cf263ba36e474728f4a02ceb086903f81 (diff)
downloadpostgresql-cd4e8caaa0eb5c3d3b12a45b29035e7a4bdfa4a8.tar.gz
postgresql-cd4e8caaa0eb5c3d3b12a45b29035e7a4bdfa4a8.zip
Fix final warnings produced by -Wshadow=compatible-local
I thought I had these in d8df67bb1, but per report from Andres Freund, I missed some. Reviewed-by: Andres Freund Discussion: https://postgr.es/m/20221005214052.c4tkudawyp5wxt3c@awork3.anarazel.de
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
-rw-r--r--contrib/postgres_fdw/postgres_fdw.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index dd858aba034..8d013f5b1af 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -1341,8 +1341,6 @@ postgresGetForeignPlan(PlannerInfo *root,
*/
if (outer_plan)
{
- ListCell *lc;
-
/*
* Right now, we only consider grouping and aggregation beyond
* joins. Queries involving aggregates or grouping do not require
@@ -6272,10 +6270,10 @@ foreign_grouping_ok(PlannerInfo *root, RelOptInfo *grouped_rel,
*/
foreach(l, aggvars)
{
- Expr *expr = (Expr *) lfirst(l);
+ Expr *aggref = (Expr *) lfirst(l);
- if (IsA(expr, Aggref))
- tlist = add_to_flat_tlist(tlist, list_make1(expr));
+ if (IsA(aggref, Aggref))
+ tlist = add_to_flat_tlist(tlist, list_make1(aggref));
}
}
}
@@ -6289,8 +6287,6 @@ foreign_grouping_ok(PlannerInfo *root, RelOptInfo *grouped_rel,
*/
if (havingQual)
{
- ListCell *lc;
-
foreach(lc, (List *) havingQual)
{
Expr *expr = (Expr *) lfirst(lc);
@@ -6324,7 +6320,6 @@ foreign_grouping_ok(PlannerInfo *root, RelOptInfo *grouped_rel,
if (fpinfo->local_conds)
{
List *aggvars = NIL;
- ListCell *lc;
foreach(lc, fpinfo->local_conds)
{