aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2022-08-26 02:35:40 +1200
committerDavid Rowley <drowley@postgresql.org>2022-08-26 02:35:40 +1200
commit3e0fff2e6888e39b0ad5cdfdb78bc1c2bb2b22c9 (patch)
tree235e23ee1c87eb2f148216535c0d300bcbe0a64e /src/backend/executor
parente3ce2de09d814f8770b2e3b3c152b7671bcdb83f (diff)
downloadpostgresql-3e0fff2e6888e39b0ad5cdfdb78bc1c2bb2b22c9.tar.gz
postgresql-3e0fff2e6888e39b0ad5cdfdb78bc1c2bb2b22c9.zip
More -Wshadow=compatible-local warning fixes
In a similar effort to f01592f91, here we're targetting fixing the warnings where we've deemed the shadowing variable to serve a close enough purpose to the shadowed variable just to reuse the shadowed version and not declare the shadowing variable at all. By my count, this takes the warning count from 106 down to 71. Author: Justin Pryzby Discussion: https://postgr.es/m/20220825020839.GT2342@telsasoft.com
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/execPartition.c1
-rw-r--r--src/backend/executor/nodeWindowAgg.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/executor/execPartition.c b/src/backend/executor/execPartition.c
index ac03271882f..901dd435efd 100644
--- a/src/backend/executor/execPartition.c
+++ b/src/backend/executor/execPartition.c
@@ -768,7 +768,6 @@ ExecInitPartitionInfo(ModifyTableState *mtstate, EState *estate,
{
List *onconflset;
List *onconflcols;
- bool found_whole_row;
/*
* Translate expressions in onConflictSet to account for
diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c
index 4b104c4d98a..8b0858e9f5f 100644
--- a/src/backend/executor/nodeWindowAgg.c
+++ b/src/backend/executor/nodeWindowAgg.c
@@ -2062,12 +2062,13 @@ ExecWindowAgg(PlanState *pstate)
if (winstate->all_first)
{
int frameOptions = winstate->frameOptions;
- ExprContext *econtext = winstate->ss.ps.ps_ExprContext;
Datum value;
bool isnull;
int16 len;
bool byval;
+ econtext = winstate->ss.ps.ps_ExprContext;
+
if (frameOptions & FRAMEOPTION_START_OFFSET)
{
Assert(winstate->startOffset != NULL);