Skip to content

Commit 27a3702

Browse files
committed
Fix warnings produced by -Wshadow=compatible-local
FDW-627, Suraj Kharage, reviewed by Vaibhav Dalvi.
1 parent 59f7d21 commit 27a3702

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

mysql_fdw.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,8 +1401,6 @@ mysqlGetForeignPlan(PlannerInfo *root, RelOptInfo *foreignrel,
14011401

14021402
if (outer_plan)
14031403
{
1404-
ListCell *lc;
1405-
14061404
/*
14071405
* Right now, we only consider grouping and aggregation beyond
14081406
* joins. Queries involving aggregates or grouping do not require
@@ -2584,8 +2582,6 @@ bind_stmt_params_and_exec(ForeignScanState *node)
25842582
*/
25852583
if (numParams > 0)
25862584
{
2587-
MemoryContext oldcontext;
2588-
25892585
oldcontext = MemoryContextSwitchTo(econtext->ecxt_per_tuple_memory);
25902586

25912587
mysql_bind_buffer = (MYSQL_BIND *) palloc0(sizeof(MYSQL_BIND) * numParams);
@@ -3641,10 +3637,10 @@ mysql_foreign_grouping_ok(PlannerInfo *root, RelOptInfo *grouped_rel,
36413637
*/
36423638
foreach(l, aggvars)
36433639
{
3644-
Expr *expr = (Expr *) lfirst(l);
3640+
Expr *aggref = (Expr *) lfirst(l);
36453641

3646-
if (IsA(expr, Aggref))
3647-
tlist = add_to_flat_tlist(tlist, list_make1(expr));
3642+
if (IsA(aggref, Aggref))
3643+
tlist = add_to_flat_tlist(tlist, list_make1(aggref));
36483644
}
36493645
}
36503646
}
@@ -3658,8 +3654,6 @@ mysql_foreign_grouping_ok(PlannerInfo *root, RelOptInfo *grouped_rel,
36583654
*/
36593655
if (havingQual)
36603656
{
3661-
ListCell *lc;
3662-
36633657
foreach(lc, (List *) havingQual)
36643658
{
36653659
Expr *expr = (Expr *) lfirst(lc);
@@ -3716,7 +3710,6 @@ mysql_foreign_grouping_ok(PlannerInfo *root, RelOptInfo *grouped_rel,
37163710
if (fpinfo->local_conds)
37173711
{
37183712
List *aggvars = NIL;
3719-
ListCell *lc;
37203713

37213714
foreach(lc, fpinfo->local_conds)
37223715
{

0 commit comments

Comments
 (0)