1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

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
This commit is contained in:
David Rowley
2022-10-07 13:13:27 +13:00
parent 4289263cf2
commit cd4e8caaa0
10 changed files with 32 additions and 43 deletions

View File

@ -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)
{