mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +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:
@@ -232,8 +232,6 @@ blinsert(Relation index, Datum *values, bool *isnull,
|
||||
|
||||
if (metaData->nEnd > metaData->nStart)
|
||||
{
|
||||
Page page;
|
||||
|
||||
blkno = metaData->notFullPage[metaData->nStart];
|
||||
Assert(blkno != InvalidBlockNumber);
|
||||
|
||||
|
@@ -450,15 +450,15 @@ get_file_fdw_attribute_options(Oid relid)
|
||||
for (attnum = 1; attnum <= natts; attnum++)
|
||||
{
|
||||
Form_pg_attribute attr = TupleDescAttr(tupleDesc, attnum - 1);
|
||||
List *options;
|
||||
List *column_options;
|
||||
ListCell *lc;
|
||||
|
||||
/* Skip dropped attributes. */
|
||||
if (attr->attisdropped)
|
||||
continue;
|
||||
|
||||
options = GetForeignColumnOptions(relid, attnum);
|
||||
foreach(lc, options)
|
||||
column_options = GetForeignColumnOptions(relid, attnum);
|
||||
foreach(lc, column_options)
|
||||
{
|
||||
DefElem *def = (DefElem *) lfirst(lc);
|
||||
|
||||
@@ -480,7 +480,7 @@ get_file_fdw_attribute_options(Oid relid)
|
||||
fncolumns = lappend(fncolumns, makeString(attname));
|
||||
}
|
||||
}
|
||||
/* maybe in future handle other options here */
|
||||
/* maybe in future handle other column options here */
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -128,15 +128,15 @@ typedef struct
|
||||
/* finalize a newly-constructed hstore */
|
||||
#define HS_FINALIZE(hsp_,count_,buf_,ptr_) \
|
||||
do { \
|
||||
int buflen = (ptr_) - (buf_); \
|
||||
int _buflen = (ptr_) - (buf_); \
|
||||
if ((count_)) \
|
||||
ARRPTR(hsp_)[0].entry |= HENTRY_ISFIRST; \
|
||||
if ((count_) != HS_COUNT((hsp_))) \
|
||||
{ \
|
||||
HS_SETCOUNT((hsp_),(count_)); \
|
||||
memmove(STRPTR(hsp_), (buf_), buflen); \
|
||||
memmove(STRPTR(hsp_), (buf_), _buflen); \
|
||||
} \
|
||||
SET_VARSIZE((hsp_), CALCDATASIZE((count_), buflen)); \
|
||||
SET_VARSIZE((hsp_), CALCDATASIZE((count_), _buflen)); \
|
||||
} while (0)
|
||||
|
||||
/* ensure the varlena size of an existing hstore is correct */
|
||||
|
@@ -943,8 +943,6 @@ foreign_expr_walker(Node *node,
|
||||
*/
|
||||
if (agg->aggorder)
|
||||
{
|
||||
ListCell *lc;
|
||||
|
||||
foreach(lc, agg->aggorder)
|
||||
{
|
||||
SortGroupClause *srt = (SortGroupClause *) lfirst(lc);
|
||||
|
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user